Announcement

Collapse
No announcement yet.

RTS Message if insufficient stock

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by NormanRouxel View Post
    Agreed. Except that it's the Perl that needs fixing as the anchor in the product layout is correct and changing that would break other bits of Actinic
    Or we could add an anchor that matches the perl scripts and leave the encoded one in the layout.

    This is a simple PHP routine to generate the additional anchor in the correct format, you can add more characters to the array as required, any character in the array is replaced by _.


    Code:
    <actinic:block php="true" >
     /****************************************************************************
     *
     * MakeProdanchor -
     * @author M Brook 16  Aug 2011
      *
     * usage example:
     * MakeProdRefList($ProductId)
     *
     * MakeProdRefList - 		This is the main call, which generates the product anchor
     *
     * @param str $ProductId 	the Product ID to start from. 
     *
     ****************************************************************************/
     if (!function_exists('MakeProductAnchor')) {
    	function MakeProductAnchor($ProductId) {
    
    		$replace = array("!","-","^","*"); 
    		$ProdId = "a".str_replace($replace,'_',$ProductId);
    		// set results in page
    		echo $ProdId;
    		return;
    	}
     }
    
    /* end of file */
    
    </actinic:block>
    and this would be the anchor code in the layout

    Code:
    <a name="<actinic:block php="true" > MakeProductAnchor('<actinic:variable name="ProductID" selectable="false" />');</actinic:block>"></a>
    I put the top code in the head section of the layout (before the </head>), and the second in the layout near the quantity code as this is where actinic places the error message. You may need to restart Actinic to get it to read the PHP code in during initialisation.

    Malcolm

    SellerDeck Accredited Partner,
    SellerDeck 2016 Extensions, and
    Custom Packages

    Comment


      #17
      Actinic have recorded this as a bug - AC10-3613
      Elysium:Online - Official Accredited SellerDeck Partner
      SellerDeck Design, Build, Hosting & Promotion
      Based in rural Northants

      Comment

      Working...
      X