Here's some more good stuff related to this.
Below is a modified version of the 10 words of reduced product description (AUG 1.2 page 19) that works with the same DuplicateIndex block to automatically reduce the product description to the first 15 words if it is seen as a duplicate.
It also adds a cgi-bin link of 'MORE INFO...' which saves having to configure any product linking on the duplicate to link to the main product.
Note that the DomainName and PerlID variables are created manually and added to the site configuration and are not standard issue library variables. So they will need to be created and configured if the above is used.
Below is a modified version of the 10 words of reduced product description (AUG 1.2 page 19) that works with the same DuplicateIndex block to automatically reduce the product description to the first 15 words if it is seen as a duplicate.
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22DuplicateIndex%22%20%2f%3e%20%3e%200" > <actinic:block php="true" > $sShort = ""; $nCount = 0; $sOriginal = '<actinic:variable encoding="perl" name="ProductDescription" selectable="false" />'; foreach(explode(" ", $sOriginal) as $sWord) { if ($nCount > 15) { $sShort .= "..."; break; } $sShort .= $sWord . " "; $nCount++; } echo $sShort; </actinic:block> <br><A HREF =http://<actinic:variable name="DomainName" />/cgi-bin/ss00000<actinic:variable name="PerlIDNumber" />.pl?PRODREF=<actinic:variable name="ProductReference" />&NOLOGIN=1 TARGET="_self">MORE INFO...</A> </actinic:block> <actinic:block if="%3cactinic%3avariable%20name%3d%22DuplicateIndex%22%20%2f%3e%20%20%3c%3d%200" > <actinic:variable name="ProductDescription" /> </actinic:block>
Note that the DomainName and PerlID variables are created manually and added to the site configuration and are not standard issue library variables. So they will need to be created and configured if the above is used.
Comment