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

    Default Returning to product listing after putting product in shopping cart

    I'm really not sure where to post this question, but this might be a start...

    I would like to return the customer to the product listing after she puts a product in the shopping cart. (almost like tusing the back button in the browser). The customers don't need to see the product info after the have chosen and picked the product.

    Does anyone know if there's an easy way to do this - and then how to do it - or if my zen-cart installation needs major surgery to implement it?

    Thanks very much

  2. #2
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Returning to product listing after putting product in shopping cart

    I second that request.

    I would like the add to cart button to behave exactly like a back button. If the user adds to cart from a category listing, they go back to (in effect, they remain on) that category listing. If from a product detail page, they go back to that page. As it works now, they end up on the details page in both cases.

    Rob

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

    Default Re: Returning to product listing after putting product in shopping cart

    You could turn off the Shop Shopping Cart in the Configuration ... My Store ...
    Display Cart After Adding Product
    Display the shopping cart after adding a product (or return back to their origin)
    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!

  4. #4
    Join Date
    Oct 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Returning to product listing after putting product in shopping cart

    Quote Originally Posted by Ajeh View Post
    You could turn off the Shop Shopping Cart in the Configuration ... My Store ...
    Sorry, no that just won't cut it. Of course that option has been set. My customers should not have to click themselves out of the shopping cart, but that's not the problem. When a customer clicks on a "BuyNow!" button (or similar) she should not be redirected to any other age unless she clicks on the product image.

    //TrondOS

  5. #5
    Join Date
    Oct 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Returning to product listing after putting product in shopping cart

    OK. I solved the problem.

    In product_listing.php I changed the line
    PHP Code:
    $lc_buttonzen_draw_form('cart_quantity_' $listing->fields['products_id'], zen_href_link(zen_get_info_page($listing->fields['products_id']),... 
    to

    PHP Code:
    $lc_buttonzen_draw_form('cart_quantity_' $listing->fields['products_id'], zen_href_link($_GET['main_page'],... 
    A crude solution, but it does the trick. I noticed that I had missed a vital piece of info. The BuyNow button actually has this functionality ...

    //TrondOS

  6. #6
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Returning to product listing after putting product in shopping cart

    Again I agree TrondOS. I too have the Display Cart After Adding Product set to false. And I too don't want the customer bounced to any page after adding something to the cart. It's disconcerting and confusing, and neither of those things promotes sales.

    However, your solution ... ['main_page'] ... looks like it bounces the customer back to the main page -- not much of an improvement from my point of view. Does it do that? Or am I being too literal?

    Rob

  7. #7
    Join Date
    Oct 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Returning to product listing after putting product in shopping cart

    Hi.

    I have my solution working on a "shop in progress" at www.northernquilts.no/zen. It's in norwegian, but if u try this url and click the "Legg i kurven"-button you'll see how it works. It returns the customer to the page of the product he put in the cart. Not to the same position down the page, but it's a huge improvement to being shown the product info.

    The url and parameters submitted by clicking the Buy-button makes it all happen. Look at the url when displaying a product list, it looks something like this:
    Code:
    www.yoursite.com/index.php?main_page=index&cPath=17_71
    Which means that the main_page with a cPath in fact is the product listing.

    I have been testing a bit and I can't find any cases in my shop where it fails. (It's not really my shop, it's my wife's, but I'm adapting zen-cart for a new version of her existing shop at www.northernquilts.no)

    //TrondOS


    //TrondOS

  8. #8
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Returning to product listing after putting product in shopping cart

    Yup, I was being too literal.

    Thanks. I'll give that a try tomorrow, and report back.

    Rob

  9. #9
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Returning to product listing after putting product in shopping cart

    I see it works on your site. Unfortunately, when I replaced all occurrences of the string you showed above with the string below that, I got errors.

    I replaced... zen_get_info_page($listing->fields['products_id']
    with... $_GET['main_page']
    seven times in the product_listing.php file. I must have made a mistake somewhere.

    I did notice that the first part (the one I replaced) was enclosed in round brackets, but in your replacement, the closing bracket was missing. Maybe that was intentional?

    Rob

  10. #10
    Join Date
    Oct 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Returning to product listing after putting product in shopping cart

    Quote Originally Posted by rstevenson View Post
    I see it works on your site. Unfortunately, when I replaced all occurrences of the string you showed above with the string below that, I got errors.

    I replaced... zen_get_info_page($listing->fields['products_id']
    with... $_GET['main_page']
    seven times in the product_listing.php file. I must have made a mistake somewhere.

    I did notice that the first part (the one I replaced) was enclosed in round brackets, but in your replacement, the closing bracket was missing. Maybe that was intentional?

    Rob
    I only replaced it once. Just below the line;
    PHP Code:
    // qty box with add to cart button 
    , there's a line that (in my code) reads;
    PHP Code:
    $lc_buttonzen_draw_form('cart_quantity_' $listing->fields['products_id'], zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' $listing->fields['products_id']), 'post''enctype="multipart/form-data"') . '<input align="top" type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" />' zen_draw_hidden_field('products_id'$listing->fields['products_id']); 
    This is where the form that processes the add to cart button is created. If you change it anywhere else I really don't know what makes the code fail, but surely it does...

    //TrondOS

 

 

Similar Threads

  1. How to link Product listing on shopping cart?
    By lala rock in forum General Questions
    Replies: 9
    Last Post: 13 Dec 2011, 03:15 AM
  2. Display Shopping Cart After Adding Product
    By Semenek in forum General Questions
    Replies: 1
    Last Post: 12 Sep 2010, 04:09 AM
  3. Jump to Shopping Cart after adding product
    By rectangle in forum Basic Configuration
    Replies: 1
    Last Post: 15 Jun 2009, 03:33 AM
  4. Shopping Cart wont display after adding product to cart
    By fmf_tactical in forum General Questions
    Replies: 2
    Last Post: 6 Mar 2009, 03:43 AM
  5. change product options after putting in cart
    By ekitel in forum General Questions
    Replies: 0
    Last Post: 13 May 2006, 05:24 AM

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