IntroSites
26-01-09, 16:18
Posted for all in response to this thread (http://www.shopwindowforum.com/showthread.php?t=1143)
Dont display the "promotion" field if its the same as the "description"
Some merchants use the first sentence of the description for the promotion field, obviously this would stop you finding an exact match.
This checks if the first 40 characters of the promotion string are the same as the description string, if true the description only is displayed, if false you get promotion and description
SW V1
{$sProductDesc}
{if $sProductPromo[40] neq $sProductDesc[40]}
<br />
{$sProductPromo}
{/if}
This replaces
{$sProductDesc}
and
{$sProductPromo}
in product_display.tpl
SW V2
{$oProduct->sDescription}
{if $oProduct->sPromotion[40] neq $oProduct->sDescription[40]}
<br />
{$oProduct->sPromotion}
{/if}
This replaces
{$oProduct->sDescription}
and
{$oProduct->sPromotion}
in product_display.tpl
Hope that helps
Dont display the "promotion" field if its the same as the "description"
Some merchants use the first sentence of the description for the promotion field, obviously this would stop you finding an exact match.
This checks if the first 40 characters of the promotion string are the same as the description string, if true the description only is displayed, if false you get promotion and description
SW V1
{$sProductDesc}
{if $sProductPromo[40] neq $sProductDesc[40]}
<br />
{$sProductPromo}
{/if}
This replaces
{$sProductDesc}
and
{$sProductPromo}
in product_display.tpl
SW V2
{$oProduct->sDescription}
{if $oProduct->sPromotion[40] neq $oProduct->sDescription[40]}
<br />
{$oProduct->sPromotion}
{/if}
This replaces
{$oProduct->sDescription}
and
{$oProduct->sPromotion}
in product_display.tpl
Hope that helps