How can we have something like a short description to be displayed for a product on the category listing page (the grid view), just under the image and before the "add to cart" button?
I have noticed you use the full product description in the "row" listing, which I don't think it's a great idea either. No user wants to see in a product listing the products with their full (!) descriptions. So this too should be somehow truncated.
All shopping carts have such an option and it's very useful to give the visitor an idea about what the product is about ... (but not let him read the whole story there)
An "in extremis" solution could be to use the first 200 characters (or first N words) from the usual description as a short description, anyone knows how can we achieve that (the code ?!) ?
I tried to adds smth. like this in product_listing.tpl but it did not work ...
<?php
$text1 = $product['description'];
private function truncate($text1, $length) {
$length = abs((int)$length);
if(strlen($text1) > $length) {
$text = preg_replace("/^(.{1,$length})(\s.*|$)/s", '\\1...', $text1);
}
return($text1);
}
?>
Could anyone please react to this and offer some help?
Thx a lot!