Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2007
    Posts
    6
    Plugin Contributions
    0

    Default 'add to cart' without displaying product info

    Hi
    I am showing individual 'add to cart' buttons in the product listing, and I allow multiples to be added. Now, if I click 'add to cart' zencart adds te items but then displays the product info page for that product. I would prefer to add to cart without having the product info page displayed, so users don't have to click out of the product info page just to get back to the product listing.

    Is there an admin option that lets me add to cart without then displaying product info? If not what would php pages would I have to modify?

    thanks
    John.

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

    Default Re: 'add to cart' without displaying product info

    Have you an URL where we can better see what you are describing?
    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: v1.5.5]
    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
    Oct 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: 'add to cart' without displaying product info

    Yes, the test site is
    http://meatdirectonline.com.au/zendevel

    I would like users to be able to add items to the cart, and stay on the product list page.

    thanks
    John

  4. #4
    Join Date
    Dec 2005
    Posts
    1,059
    Plugin Contributions
    2

    Default Re: 'add to cart' without displaying product info

    In Admin/Configuration/My Store, set Display Cart After Adding Product to false.
    [FONT=Arial]Country Kitty Crafts[/FONT][FONT=Arial]
    [/FONT] [FONT=Garamond]
    [/FONT]

  5. #5
    Join Date
    Oct 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: 'add to cart' without displaying product info

    Hi Tshooters
    It is already set to false. I would like to suppress the display of product info that follows after I press 'add to cart', so I don't have to press the 'back' button to see the product list again.

    thanks
    John

  6. #6
    Join Date
    Jan 2004
    Posts
    66,363
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 'add to cart' without displaying product info

    1. Copy /includes/init_includes/init_cart_handler.php
    to /includes/init_includes/overrides/init_cart_handler.php
    (yes, "overrides/" is literal ... it means "overrides/", not a template name)

    2. Edit the new file (in the overrides folder)
    and replace this:
    Code:
      if (DISPLAY_CART == 'true') {
        $goto =  FILENAME_SHOPPING_CART;
        $parameters = array('action', 'cPath', 'products_id', 'pid', 'main_page');
      } else {
    with this:
    Code:
      if ($current_page_base == FILENAME_DEFAULT) {
        $goto =  FILENAME_DEFAULT;
        $parameters = array('action', 'cPath', 'products_id', 'pid', 'main_page');
      } elseif (DISPLAY_CART == 'true') {
        $goto =  FILENAME_SHOPPING_CART;
        $parameters = array('action', 'cPath', 'products_id', 'pid', 'main_page');
      } else {
    This will cause the add-to-cart to leave the customer on the product listing page or the product-info page, depending where they came from, assuming the Display Cart After Adding Product setting is set to false.



    On second thought, even this shouldn't be necessary, as the core code already does it.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Nov 2007
    Posts
    30
    Plugin Contributions
    0

    Default Re: 'add to cart' without displaying product info

    I tried this at cacaocouture.com/store and can't get it to work.

    Do I need to delete the non-override version?

  8. #8
    Join Date
    Nov 2007
    Posts
    30
    Plugin Contributions
    0

    Default Re: 'add to cart' without displaying product info

    This seems to make sense to me, so I don't know why it still goes to the listing when I try it.
    Did this work for anyone?
    Not work?

  9. #9
    Join Date
    Nov 2007
    Posts
    30
    Plugin Contributions
    0

    Default Re: 'add to cart' without displaying product info

    OK, so it does work, but not for the category listings. At least not while using the grid layout plugin.

    What would I have to change to get it to return to the category listing instead of going to the product info page?

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

    Default Re: 'add to cart' without displaying product info

    Quote Originally Posted by juicevb10 View Post
    This seems to make sense to me, so I don't know why it still goes to the listing when I try it.
    Did this work for anyone?
    Not work?
    Nope... not working for me either.
    I did the over-ride as per Dr Byte's suggestion, then removed the original INIT file. I set the "Display Cart after Adding Product" to "false".
    19 years a Zencart User

 

 

Similar Threads

  1. Replies: 16
    Last Post: 13 Jan 2013, 06:10 PM
  2. Add to Cart Without clicking product link
    By UrKoS in forum Basic Configuration
    Replies: 3
    Last Post: 9 Sep 2011, 01:19 AM
  3. Showing a Product without allowing to add to Cart
    By buzzfever in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 24 Oct 2010, 10:42 PM
  4. Add to cart - without leaving Product listing?
    By bigmo337 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Jun 2010, 12:20 AM
  5. Special: Add product to cart without leaving product page.
    By ryanthemadone in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 31 Jan 2010, 02:36 AM

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