Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2010
    Posts
    897
    Plugin Contributions
    0

    Default Product Listings: What triggers "... more info" and "Buy Now" buttons?

    Hi,

    I cannot for the life of me figure out how to use "...more info" as my default button for pages that display lists of products.

    Here is a link to my cart (zc155e, using a clone of Responsive Classic):
    https://002mc.justmedical.biz/index....index&cPath=23

    As you can see, some products display the "... more info", others the "Buy Now". How is that happening? What is triggering it?

    Any help would be deeply appreciated!

    +++
    NOTE: If you do not see "... more info", look for buttons that say "View Details". I may have already updated the language file.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Product Listings: What triggers "... more info" and "Buy Now" buttons?

    More info is at least first presented when the product has attributes that could affect the selection of the product. I.e. option value 1 or option value 2. Option name 1 (with options) or Option Name 2 (with options). I have seen code (off the top of my head not sure if only recently added or not or just in theory) where if a product has one attribute and there is no selection option then that product can be directly added to the cart without user choice being made. Ie. read-only attributes would be a good reason to not show the need to be on the product page in order to add the product to the cart. But the version of zen_has_product_attributes at which I'm looking at doesn't make an allowance for just one attribute option value as identifying that it can be added directly to the cart.

    An alternate option is to basically always require going to the product itself (effectively presenting the more info... type button for all product), but that is not what you appear to be wanting to accomplish so is not a reason for you seeing more info... in the current arrangement.

    As to trigger specifically? It is code in the includes/modules/YOUR_TEMPLATE/product_listing.php file such as this:

    Code:
    // more info in place of buy now
            $lc_button = '';
            if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
              $lc_button = '<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 {
    That establishes the button to display more info...
    Last edited by mc12345678; 1 Nov 2017 at 05:56 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Apr 2010
    Posts
    897
    Plugin Contributions
    0

    Default Re: Product Listings: What triggers "... more info" and "Buy Now" buttons?

    Thanks, MC.

    I had seen that code in the product_listing.php file and considered trying to close it off.

    Can I simply replace it with this:
    Code:
    // more info in place of buy now
            $lc_button = '';
            (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
              $lc_button = '<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>';
            }

  4. #4
    Join Date
    Apr 2010
    Posts
    897
    Plugin Contributions
    0

    Default Re: Product Listings: What triggers "... more info" and "Buy Now" buttons?

    That didn't work, obviously.

    You know, I've never had a problem doing this before. Here is a zc154 where every prod listing gives the View Details ("... more info") button.
    https://smtsuppliesDOTcom/Fume_Dust_...tion_Arms_Kits

    And another cart, this one older (zc139h):
    https://www.med-partsDOTcom/Centrifuges/COULTER/S880

    I really, really don't want to alter the code. I just want to figure out what triggers the behavior (w/o having to add options, whatever).

  5. #5
    Join Date
    Apr 2010
    Posts
    897
    Plugin Contributions
    0

    Default Re: Product Listings: What triggers "... more info" and "Buy Now" buttons?

    Ok, got it working by doing something I had done a dozen times before. I must of flipped another switch somewhere else too, but I have no idea where.

    Anyway, ultimately I went back to where I started: Admin>Configuration>Product Listing>Display Product Add to Cart Button.

    When I set that to zero, every product suddenly displayed the "... more info" (View Details) button.

    I'm taking this to the bank and moving on. Thanks for you help, MC!

  6. #6
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Product Listings: What triggers "... more info" and "Buy Now" buttons?

    Ohhh.. Are you wanting then the More Info... to always show?

    Then goto Configuration->Product Listing and change the setting of 'Display Product Add to Cart Button (0=off; 1=on; 2=on with Qty Box per Product)' to 0 and all product will show the More Info... button, assuming that's what you wanted..
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Apr 2010
    Posts
    897
    Plugin Contributions
    0

    Default Re: Product Listings: What triggers "... more info" and "Buy Now" buttons?

    Bingo. Super sorry about the lack of clarity in my OP!

  8. #8
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Product Listings: What triggers "... more info" and "Buy Now" buttons?

    Quote Originally Posted by Feznizzle View Post
    Bingo. Super sorry about the lack of clarity in my OP!
    Other than the sort of emphasis after the first sentence implying (misread) that it was desired to NOT have more info... displayed, your first sentence was quite clear.

    I got more focused on addressing the "why" than the how to... all good. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v151 why do some items say "more info" and others have a "buy now" graphic?
    By Nick Robinson in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 29 Jul 2016, 05:09 PM
  2. v1.2.x Some products "buy now" others "more info" can you help?
    By luke_pickering in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 3 Sep 2014, 05:47 PM
  3. Showing "More Info" & "Buy Now" on Product Listing
    By litepockets in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 20 Jul 2009, 05:23 PM
  4. Is it possible to have *both* "Buy Now" and "...more info"?
    By zcnb in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 22 Sep 2008, 05:49 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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR