In case anyone wants to do this, I've come up with some simple custom code to allow the display of a short descriptions.
Basically, enter your description as normal with a <br /> where you want to short description to end.
So for example, enter your full description as:
"Tasty Strawberry Jam<br />This is the best Strawberry jam you will have ever tasted."
The code below will look for the <br /> tag and only display "Tasty Strawberry Jam" as the description on the product listing page. If you don't put in a <br /> tag then the description will display as normal.
You need to edit your overridden product_listing.php file (found in includes\modules\YOURTEMPLATE) , and find the line:
Code:
$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id'] > 0) ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
And replace it with this code:
Code:
$shortDesc = zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']);
// Now find the first occurance of <br /> - We actually look for <br in case we have forgotten the space
$brPos = stripos($shortDesc, '<br');
// If no <br /> tag then just show whole description as normal.
if ($brPos != 0)
{
$shortDesc = substr($shortDesc, 0, $brPos );
}
$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id'] > 0) ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes($shortDesc)), PRODUCT_LIST_DESCRIPTION) . '</div>';
You can of course change this to look for a different tag instead or even to not show the short description on the product detail page.
Hope this helps someone else.
Bob.
Bookmarks