Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2009
    Posts
    17
    Plugin Contributions
    0

    Default Add "More Info" Button on Product Descriptions

    This is probably just an easy HTML fix. My Product description is way long, and I want to make it so that it just has the product overview, then the customer can click on the "More Info" text and the rest of the description will appear. I hope that makes sense... Thanks in advance for the help.
    VIP

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Add "More Info" Button on Product Descriptions

    You can customize the product_listing module by adding on to the description for this section of code around lines 97 - 101 using your templates and overrides:
    Code:
            if (isset($_GET['manufacturers_id'])) {
              $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>' ;
            } else {
              $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>';
            }
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Sep 2009
    Posts
    17
    Plugin Contributions
    0

    Default Re: Add "More Info" Button on Product Descriptions

    OK, Thanks for the quick response... What will that do, exactly? Will I be able to insert the "more info" where I want, or what will it do? And will the side picture and the add to cart move up if I do that? Ex. http://www .vipoptics. com/index.php?main_page=product_info&cPath=88_1&products_id=181 (On the left side)

    Thanks again,
    VIP
    Last edited by vipoptics; 7 Feb 2010 at 03:45 AM.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Add "More Info" Button on Product Descriptions

    This section of code displays the products_description ... if you added on to it a more information button it would be at the end of the description ...

    If you want to add a button or text to where the add to cart button is, then you need to locate that part of the code in that file ...

    If you look through the case statements you will see where the various parts of the listing are built and can add the button or text to any portion of it ...

    Try to add:
    Code:
    . '<br>Hello World'
    to any part of the code to test where it is being added ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Nov 2009
    Posts
    339
    Plugin Contributions
    0

    Default Re: Add "More Info" Button on Product Descriptions

    Good Morning.
    I uploaded the code to includes/modules/MyTemplate/product_listing.php & to includes/modules/product_listing.php.
    I also added after product_list_description the " <BR>Hello World'.
    I just can't see where it's suppose to come up. I also don't see any changes in the admin/configuration/product listing page.
    I really would like to be able to use this idea, since I too have certain items that are text & specification heavy.
    Thanks in advance for your help
    Last edited by RobertG; 10 Feb 2010 at 06:15 PM.

  6. #6
    Join Date
    Sep 2005
    Location
    Adelaide South Australia
    Posts
    31
    Plugin Contributions
    0

    Default Re: Add "More Info" Button on Product Descriptions

    Hi Robert,

    If you replace the code Ajeh noted earlier, on or around lines 94 tp 102 of product_listing.php, with the following it should achieve the desired results;

    Please remember, as with any file modification remember to save the modified file in your custom template folder.

    Code:
    break;
            case 'PRODUCT_LIST_NAME':
            $lc_align = '';
            if (isset($_GET['manufacturers_id'])) {
              $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>' ;
            } else {
              $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>';
            }
    break;

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Add "More Info" Button on Product Descriptions

    How would one display the ADD TO CART button, AND the "More Info" Text - at the same time?

    Right now, it's either/or ... depending on a product's attributes status.

    But I have a client with products that don't have attributes, and he wants BOTH the "Add to Cart" functionality - (depending on what has been configured in the admin panel) - and the "more info..." link.
    20 years a Zencart User

  8. #8
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Add "More Info" Button on Product Descriptions

    Managed to sort it out via various threads that discuss the module file, product_listing.php .

    Thanks mostly to Linda who provided the guidance!
    20 years a Zencart User

 

 

Similar Threads

  1. v150 Can I add "More Info" link in Descriptions?
    By vmarty123 in forum General Questions
    Replies: 3
    Last Post: 26 Feb 2013, 07:13 PM
  2. Both "More info" and "Add to cart" in product list
    By Gunnel in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 21 Jan 2011, 09:47 AM
  3. Adding more than one button "add to cart" on product info page....
    By Celebrimbor in forum General Questions
    Replies: 14
    Last Post: 4 Feb 2010, 05:41 PM
  4. Can I make all "add: 0" input boxes on product pages to "more info..."?
    By sfklaas in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Aug 2009, 06:05 PM
  5. "... more info" link is displayed where I want a "buy now" button
    By ballyc27 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 24 Sep 2007, 05:05 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