Post by jthrongard » Thu Jul 06, 2017 2:39 am

I have tried the various fixes but none are clearing the cart after logout. This is what I currently have in file /system/library/cart/customer.php

Code: Select all

			if ($customer_query->num_rows) {
				$this->db->query("delete FROM " . DB_PREFIX . "cart WHERE customer_id = '". $customer_query->row['customer_id']."'");

Small Business Joomla! Website Design - Simple CMS Design
http://www.simplecmsdesign.com


User avatar
New member

Posts

Joined
Fri Jun 08, 2012 12:22 am
Location - Boise, ID

Post by IP_CAM » Thu Jul 06, 2017 3:37 am

Something like this, I assume ?
Ernie
Old Cart items retaining fix
When your customer logins after adding products to cart , he sees some old items added to cart automatically.
This annoys customers as they didn't asked to add those to cart.
This will fix the issue, cart won't show old items that customer doesn't demands to be added to his basket.
https://www.opencart.com/index.php?rout ... n_id=25558

I am no longer active at the Forum. Please do NOT send me Personal Mails,
they will no longer be replied to.
My Github OC Site: https://github.com/IP-CAM
4'300 + FREE OC Extensions, on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by jthrongard » Fri Jul 07, 2017 12:25 am

I already tried this option and it didn't change a thing for me.

Small Business Joomla! Website Design - Simple CMS Design
http://www.simplecmsdesign.com


User avatar
New member

Posts

Joined
Fri Jun 08, 2012 12:22 am
Location - Boise, ID

Post by DigitCart » Fri Jul 07, 2017 12:50 am

Open this file:

Code: Select all

catalog/controller/account/logout.php
add this:

Code: Select all

$this->cart->clear();
before:

Code: Select all

$this->customer->logout();

My Extensions / DigitCart


User avatar
Active Member

Posts

Joined
Thu Jun 22, 2017 5:32 pm


Post by jthrongard » Fri Jul 07, 2017 12:53 am

That didn't do it either.

Small Business Joomla! Website Design - Simple CMS Design
http://www.simplecmsdesign.com


User avatar
New member

Posts

Joined
Fri Jun 08, 2012 12:22 am
Location - Boise, ID

Post by DigitCart » Fri Jul 07, 2017 1:15 am

I've tested it before sending my reply. It works for me.
Did you clear your ocmod/vqmod cache?

My Extensions / DigitCart


User avatar
Active Member

Posts

Joined
Thu Jun 22, 2017 5:32 pm


Post by deadiwe » Fri May 07, 2021 1:20 pm

jthrongard wrote:
Fri Jul 07, 2017 12:25 am
I already tried this option and it didn't change a thing for me.
It works, do not forget to refresh your modifications
and change text in /catalog/language/en-gb/account/logout.php

Newbie

Posts

Joined
Wed Apr 10, 2019 5:48 pm
Who is online

Users browsing this forum: No registered users and 34 guests