Post by patchonaiew » Mon Jan 20, 2020 9:22 am

If this has been answered elsewhere my apologies, I've searched a good bit.

I have OC 3.0.3.2 relatively freshly installed in a subdomain on a shared server with no modified core files.
I'm using the iStore OC compliant theme and have installed just a couple extensions, I believe none of which should affect the shopping cart.
I've checked the Events, all there and active.

My issue is this (at the very least) when I add a product to the shopping cart from a product page it shows the cart count increase by 1, then I press the back button on the browser (tried on Chrome, Edge, and Safari) the cart shows empty (0), then I refresh the browser screen and now my product is back in the cart.

I haven't explored all the possible situations the cart contents display incorrectly but I'm willing if the added info would help diagnose the issue.

I'm really new to Opencart and I know just enough to be dangerous generally speaking so I graciously thank you in advance for any help offered! ;)

Cheers!

Newbie

Posts

Joined
Mon Jan 20, 2020 8:57 am

Post by opencartmart » Mon Jan 20, 2020 4:23 pm

patchonaiew wrote:
Mon Jan 20, 2020 9:22 am
My issue is this (at the very least) when I add a product to the shopping cart from a product page it shows the cart count increase by 1, then I press the back button on the browser (tried on Chrome, Edge, and Safari) the cart shows empty (0), then I refresh the browser screen and now my product is back in the cart.
Cheers!
This is the browser behavior, nothing related to Opencart.

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by letxobnav » Mon Jan 20, 2020 9:51 pm

that is a browser cache issue, wrong expire headers.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by paulfeakins » Tue Jan 21, 2020 12:04 am

As above, usually when you press the back button the browser doesn't re-load the page but shows you what it saw before the item was in the cart.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by ADD Creative » Tue Jan 21, 2020 1:07 am

This is probably caused by a bug introduced in version 3 in that the cache control headers are not set in the response.
https://github.com/opencart/opencart/issues/7008

Try adding the cache control header as described here.
viewtopic.php?f=201&t=207498#p737430

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by opencartmart » Tue Jan 21, 2020 4:35 pm

ADD Creative wrote:
Tue Jan 21, 2020 1:07 am
This is probably caused by a bug introduced in version 3 in that the cache control headers are not set in the response.
https://github.com/opencart/opencart/issues/7008

Try adding the cache control header as described here.
viewtopic.php?f=201&t=207498#p737430
You are absolutely correct. :good: :good: :good:

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by patchonaiew » Sat Jan 25, 2020 10:37 am

Thanks for the many responses and I apologize for my delayed message, I’m on a last minute business trip with little time to attend to personal emails.

When I return home in a few days I will take a look at the cache related issue and suggested fix. I’ll be sure to post the results of the implementation here for others to benefit.

Thanks all for your support!

Newbie

Posts

Joined
Mon Jan 20, 2020 8:57 am

Post by patchonaiew » Sun Feb 02, 2020 9:26 am

ADD Creative wrote:
Tue Jan 21, 2020 1:07 am
This is probably caused by a bug introduced in version 3 in that the cache control headers are not set in the response.
https://github.com/opencart/opencart/issues/7008

Try adding the cache control header as described here.
viewtopic.php?f=201&t=207498#p737430
Fixed the issue!

Many thanks community!

Newbie

Posts

Joined
Mon Jan 20, 2020 8:57 am
Who is online

Users browsing this forum: Bing [Bot] and 56 guests