Page 1 of 1

[SOLVED] Saving shooping cart

Posted: Wed Aug 31, 2011 7:14 pm
by AnonyMoose
I wonder if anyone else find saving shopping cart a bit confusing. It works fine if user logs in using 'login' link on the top of the page - cart box is updated immediately with both old and new items counted, but not when he logs in at checkout page.

Process looks like this:


Customer logged in, added 2 items to the shopping cart and decides not to buy anything this time then logs out - cart is saved.

Same customer returns after few weeks and wants to buy this time. Adds 2 items to empty basked, goes to the checkout, then logs in at the checkout page. Shopping cart at the top of the page doesn't refresh automatically, so it's still showing only 2 items with price. Customer selects postage address, payment method and then in the last 'Confirm Order' step he can see al 4 items in the basket - 2 from current session and 2 saved few weeks ago, which he doesn't even remember any more.



This is a bit confusing for many people, it would be great to have one of these options:

1. disable saving cart when user logs out - can this be done from admin panel or by editing some config files?
2. customer logs in at the checkout page and gets a question 'do you want to add previously saved items to your cart'.

Re: Saving shooping cart

Posted: Wed Aug 31, 2011 7:37 pm
by uksitebuilder
Open: catalog/view/theme/default/template/checkout/checkout.tpl

Find 4th occurrence of:

Code: Select all

				location = json['redirect'];
			}
replace with:

Code: Select all

				location = json['redirect'];
			}else{
				location.reload();
			}

Re: Saving shooping cart

Posted: Wed Aug 31, 2011 9:59 pm
by ninogui
1511, chrome here

funny enough I don´t have that reload() function and when customer logs in their saved cart is intact

even when adding to the cart as visitor (no logged in session) when entering the shop page it´s still there, prob because no cookies/cache where cleared

Re: Saving shooping cart

Posted: Thu Sep 01, 2011 3:22 am
by uksitebuilder
You wont have that reload() function unless you add it.

Re: Saving shooping cart

Posted: Thu Sep 01, 2011 3:51 am
by AnonyMoose
I would actually prefer to disable this option completely in this case. Users are not aware of it (nobody reads explanation on screen when they log off), and customers who want to save items for later use Wish List option.

Can this be easily disabled?

Re: Saving shooping cart

Posted: Thu Sep 01, 2011 5:52 am
by uksitebuilder
Not easily no

Re: Saving shooping cart

Posted: Thu Sep 01, 2011 6:25 am
by AnonyMoose
uksitebuilder wrote:Not easily no

Thanks for quick reply and help with refreshing. I've done the changes and it worked fine!

Re: [SOLVED] Saving shooping cart

Posted: Thu Dec 12, 2024 7:40 am
by soydemadrid
Hi, I'm also having this problem with Opencart 3.0.2

Does the above fix stick work in 3.x?

Thanks for your help.