Forums / Templates, Stylesheets, Page Layout / Product listing more info link

Product listing more info link

Locked

Views: 2,870

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
4 Jan 2009, 6:53 AM
#1
121webconsultancy avatar

121webconsultancy

New Zenner

Join Date:
May 2007
Posts:
42
Plugin Contributions:
0

Product listing more info link

Hi

Trying to keep things to a clean minimum layout, in admin > config > product listing I have turned off 'Display Product Price/Add to Cart' so that I just have a product title and short description on the product listing page. i.e. www.prestigeringcompany.com/index.php?main_page=index&cPath=4_10

My query is: how do I now go about adding a 'more info' link to the end of the short description text to link to the individual product detail page?

Many thanks,

Steve :bigups:

121webconsultancy - Professional Website Design & Internet Marketing

4 Jan 2009, 7:34 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product listing more info link

/includes/modules/your_template/product_listing.php will have the code for this. You can prune down and relocate some of the code from the case: 'price' block to the case:'name' block.

Alternately, you might just replicate the title link which goes to the same place, and make its content "...more info" instead of the product name.

5 Jan 2009, 4:24 PM
#3
121webconsultancy avatar

121webconsultancy

New Zenner

Join Date:
May 2007
Posts:
42
Plugin Contributions:
0

Re: Product listing more info link

Many thanks for your response Glen. After some time I eventually achieved my goal.

For anybody wishing to do the same... i.e. add a 'more info' link to the end of the short description text in the product listing... Find this code around line 141 of product_listing.php :

<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 change it to this:

<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 ? 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']) . '">more info</a></div>'; }

:clap:

121webconsultancy - Professional Website Design & Internet Marketing

21 Jan 2009, 2:25 AM
#5
maureent avatar

maureent

New Zenner

Join Date:
Nov 2008
Posts:
60
Plugin Contributions:
0

Re: Product listing more info link

This is great, but how would one make the "more info" link appear only when the description is truncated, in other words, not appear when there is no additional info to go see? Obviously, it needs to have an 'if' statement, but I don't know the correct way to do it.

By the way, if someone wants the more info link to be identical to the one that shows up when a product has attributes, change the following snippet of code from what 121webconsultancy has in his post.

Change:

$listing->fields['products_id']) . '">more info</a></div>'

To:

$listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a></div>'

Or you can create an entirely new define statement in english.php and change MORE_INFO_TEXT to that.