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
    64,714
    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.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  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,064
    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
    58,262
    Blog Entries
    3
    Plugin Contributions
    106

    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!
    Donations always welcome: www.zen-cart.com/donate

    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
    Hertfordshire, UK
    Posts
    9,916
    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".
    Did my post help you fix something? You can show your gratitude by buying the the dev team coffee.

 

 

Similar Threads

  1. Category Image Size
    By ideasgirl in forum Customization from the Admin
    Replies: 11
    Last Post: 24 Mar 2011, 12:47 PM
  2. Add Product to Cart URL
    By Webbo1969 in forum Customization from the Admin
    Replies: 24
    Last Post: 27 Mar 2007, 01:38 AM
  3. I feel so stupid: My product info page does not show price/add to cart
    By baselinej70 in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 14 Jan 2007, 02:55 PM
  4. Replies: 3
    Last Post: 14 Sep 2006, 07:58 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
  •