Forums / Templates, Stylesheets, Page Layout / How-to add more info link in standard products listing

How-to add more info link in standard products listing

Views: 727

Results 1 to 1 of 1
15 Apr 2014, 10:21 AM
#1
robyweb avatar

robyweb

New Zenner

Join Date:
Mar 2007
Posts:
22
Plugin Contributions:
0

How-to add more info link in standard products listing

I need to add a "more info" link to the end of description in standard products listing (as it works in all-product listing)

Here is my solution (hope this help if someone is interested in)

in
includes/modules/YOUR_TEMPLATE/product_listing.php

find this code ( in my file line 97)

$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>';

change like this (in red added 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) . '<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 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>' . '</div>';

If you want use a different anchor text for the link

add

define('TEXT_YOU_WANT','anchor_text_for_link ...');

in

includes/languages/YOUR_TEMPLATE/english.php * (or your language)*

and then use TEXT_YOU_WANT instead of MORE_INFO_TEXT in the code above

It works for me ...
I hope this help

Sorry for my English !