You are here:  » Merchant descriptions

Support Forum



Merchant descriptions

Submitted by JasonG on Fri, 2011-11-04 19:15 in

Hi

No idea if there has been discussions on this topic before and what people have done as a work around solution

Some of the merchant descriptions are long and messy, I know there is a custom description area within product mapping but to do this on 20k products woudl be near on impossible

What would be really cool is if there was a way to automatically reduce the description to a cerain lengh or number of characters (lenght to be decided), then add on ALL products a "To read more, visit the shops below" or similar wording.

Let me know if the above is possible or if there have been other discussions or solutions to the problem

Thanks
Stuart

Submitted by support on Sat, 2011-11-05 10:22

Hi Stuart,

No problem - there's a nice function in the tapestry.php library to truncate a string to the nearest word (so that you don't crop words in the middle); and is used to generate the description snippets on search result pages.

To use the function on the main product page and to add your "More info..." text, look for the following code at around line 13 of html/product.php

  <p><?php print $mainProduct["description"]; ?></p>

...and REPLACE with:

  <p><?php print tapestry_substr($mainProduct["description"],300,"..."); ?></p>
  <p>To read more, please visit one the shops listed below...</p>

Simply change the crop length (300 characters in the above) as required.

Cheers,
David.
--
PriceTapestry.com