Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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.

  2. #2
    Join Date
    May 2007
    Posts
    42
    Plugin Contributions
    0

    Default 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($listi ng->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($listi ng->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>';
    }

    121webconsultancy - Professional Website Design & Internet Marketing

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Product listing more info link

    Thanks for sharing the complete solution!

  4. #4
    Join Date
    Nov 2008
    Posts
    60
    Plugin Contributions
    0

    Default 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.

    Code:
    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.

  5. #5
    Join Date
    Nov 2008
    Posts
    60
    Plugin Contributions
    0

    Default Re: Product listing more info link

    Never mind. I figured it out for myself. If anyone wants to know how to do it, I've posted the instructions at http://www.zen-cart.com/forum/showth...664#post675664

 

 

Similar Threads

  1. v151 How-to add more info link in standard products listing
    By robyweb in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 15 Apr 2014, 11:21 AM
  2. Product listing - move price/more info link
    By RobM in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 24 May 2011, 06:46 PM
  3. Add more info link to product listing description when description is truncated
    By MaureenT in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 16 Sep 2010, 05:44 PM
  4. More Info Link on New Products Listing
    By LadyHLG in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 23 Feb 2008, 06:24 PM
  5. Display more info link in Product Listing
    By numenor in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 9 Jul 2006, 01:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg