Post by nry » Fri Aug 24, 2018 8:48 pm

I have the exact same issue - raw/pure OC 3.0.2.0 installed and the cart cache issue is there. I have added no extensions, done nothing beyond install OpenCart from the current download on this website and move the storage directory when I logged in as admin. I did this clean install to see if the same issue I have on an almost ready to go live project was related to the website itself or OpenCart - seems it is something to do with OpenCart.

I'm at a loss, for those who fixed it, saying your hosting made a change, can you find out what they did?

nry
Newbie

Posts

Joined
Tue Feb 21, 2017 4:11 pm

Post by straightlight » Sat Aug 25, 2018 5:34 am

seems it is something to do with OpenCart.
If it would be the case, nobody would be able to use it due to cache misconfiguration since everybody would be affected. FAQ: viewtopic.php?f=176&p=731764#p717782

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by nry » Sun Aug 26, 2018 5:13 pm

I've spent two hours this morning trying 4 fresh installs of raw OC 3.0.2.0 - I have followed, to the letter, the guides on here for moving the cache, trying both manual and automatic moves, editing the config.php files, taking the line out of htaccess, deleting the storage folder, uploading from the OC zip file...

It is still giving the same cart cache problem:

http://www.vikingfinal.lightbulbwebdesign.co.uk

I'm really at a loss - is there some problem or issue when running OC on a sub-domain, with the files in a sub-folder within the main domain structure? This is all I can think of, as I have two live OC 3.0.2.0 sites working fine on their own final domains, however I do not recall the same cart issue on those when they were being built on their own sub-domains originally - it is possible we didn't try adding and deleting products from cart, just a single add to cart and checkout process run through, to confirm that worked, before moving them to live.

nry
Newbie

Posts

Joined
Tue Feb 21, 2017 4:11 pm

Post by nry » Sun Aug 26, 2018 5:53 pm

Voila, yes, this is 100% to do with sub-domain usage - moving the site live works perfectly, no cart cache issues at all.

I did nothing except move the website over using Akeeba, restored the off-root storage folder, manually edited the config.php files and there we have it, cart works perfectly.

So, anyone here chasing the cart cache issues may well have the same outcome - put it on a main domain, no sub, and see if it behaves properly.

I never had this issue with OC 2.*, so whilst is isn't a 'bug', it is certainly poor behaviour which seems to be confusing many many OC3 users...

nry
Newbie

Posts

Joined
Tue Feb 21, 2017 4:11 pm

Post by straightlight » Sun Aug 26, 2018 8:04 pm

So, anyone here chasing the cart cache issues may well have the same outcome - put it on a main domain, no sub, and see if it behaves properly.
The only problematic by considering this solution would be for users relying on multistores.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by nry » Mon Aug 27, 2018 12:04 am

straightlight wrote:
Sun Aug 26, 2018 8:04 pm
So, anyone here chasing the cart cache issues may well have the same outcome - put it on a main domain, no sub, and see if it behaves properly.
The only problematic by considering this solution would be for users relying on multistores.
True, however given this worked with OC2, but does not work with OC3, that still suggests to me that OC3 is doing something different with use on subdomains/folders, and is why it causes issues with multi-store setups as well. Moving to a final domain should not be a 'solution', it just suggests that this stops some OC3 issue from arising vs subdomain/folder/multistore.

I was told by the theme developer that OC3 was using 'two cache locations', even though I will 100% guarantee the config.php files were both using the same location path, and I had manually cleared cache files to be sure and also did this within OC3 admin alongside refreshing the modification cache just to be sure.

If I look at the cookies in use via Chrome Developer Tools, I was seeing cookies set to:

domain.com
subdomain.domain.com
www.subdomain.com
www.subdomain.domain.com

Even though I was only ever visiting the www.subdomain.domain.com - if I turned off cache in Chrome Developer Tools, it all worked fine...so something in OC3 seems to be getting confused...not sure if any of that helps.

nry
Newbie

Posts

Joined
Tue Feb 21, 2017 4:11 pm

Post by straightlight » Mon Aug 27, 2018 1:20 am

I was told by the theme developer that OC3 was using 'two cache locations'
Which theme developer are you referring to?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by apco » Thu Sep 13, 2018 3:36 am

I am too having the same issue. Opencart 3.0.2.0 A2Hosting. I also have Journal installed and it is not the theme causing the issue as it still happens when theme is turned off. A2 Hosting looked into this and can't find anything wrong with it. I also checked the

Straighlight, can you please provide more insight as to how to fix this issue?

Thank you!

Newbie

Posts

Joined
Thu Dec 21, 2017 12:14 am

Post by IP_CAM » Thu Sep 13, 2018 4:58 am

Well, I am confronted with this problem for some time already with my 'older' OC Version,
and I was not able so far, to find exactly on, why it exists. In one case, I just had to move up
the jquery-2.1.1.min.js file a couple of lines, in the Theme header file, to make it work
again, but I still have one test site, where it still does not work, by use of (more or less 8) ) the
same Code. It might be another script, hindering the routine from doing it's job.
But I only had to move it up, because I changed the lines before, to meet Pagetester Site
requirements, to get a little better results. STILL, in the other Test Shops, it works :crazy:
But it could also be related with the common.js file, in one case, I used another one,
and it worked (again). But Journal sure has/uses it's own, so, there's another problem.

To me, it's a similar situation like the use of 'price-auto-update' Product Options, most of them
collide with other Scriptings and so don't work. So, if you use additional Extensions to your
Theme, they could have such an effect.
Just to have in mentioned, you're not alone.... , good Luck! ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

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

Post by sayahan » Wed Oct 03, 2018 7:18 pm

Hello,
I had a similar problem. Cause of my problem is browser cache. I writed meta tags for no-cache on header.twig or htaccess mod_header rules but I couldn't get rid of browser cache. At the end of this solution, it is works.
I writed to beginning of file on site root index.php:

Code: Select all

header("Cache-Control: no-cache, must-revalidate");
Normally you can control header with .htaccess but I use multiPHP and I have to use a .htaccess mime_module rule ( AddType application/x-httpd-ea-php56 .php .php5 .phtml ) for php5.6. Because of this rule, Header unset Cache-Control rule not works in .htaccess

I hope this works for you too.

Newbie

Posts

Joined
Mon Oct 01, 2018 11:23 pm

Post by Hutcho » Fri Nov 09, 2018 8:22 am

Hi if you aren't in the US eg I'm in Australia the issue is the date. I thing that around 12 noon the date in Open cart will show the next days date, all you have to do is change the date to an earlier date.


Hope this helps

Glenn

Newbie

Posts

Joined
Wed Nov 29, 2017 10:44 am

Post by synapseindia » Mon Nov 12, 2018 6:56 pm

Hi Guys,

You can fix the issue by adding below code in htaccess file.

Code: Select all

<IfModule mod_headers.c>
	Header set Cache-Control "no-cache, no-store, must-revalidate"
	Header set Pragma "no-cache"
	Header set Expires 0
</IfModule>
Thanks

User avatar
Active Member

Posts

Joined
Thu Apr 05, 2018 2:27 pm

Post by rossi123 » Mon Dec 10, 2018 12:05 am

IP_CAM wrote:
Thu Sep 13, 2018 4:58 am
Well, I am confronted with this problem for some time already with my 'older' OC Version,
and I was not able so far, to find exactly on, why it exists. In one case, I just had to move up
the jquery-2.1.1.min.js file a couple of lines, in the Theme header file, to make it work
again, but I still have one test site, where it still does not work, by use of (more or less 8) ) the
same Code. It might be another script, hindering the routine from doing it's job.
But I only had to move it up, because I changed the lines before, to meet Pagetester Site
requirements, to get a little better results. STILL, in the other Test Shops, it works :crazy:
But it could also be related with the common.js file, in one case, I used another one,
and it worked (again). But Journal sure has/uses it's own, so, there's another problem.

To me, it's a similar situation like the use of 'price-auto-update' Product Options, most of them
collide with other Scriptings and so don't work. So, if you use additional Extensions to your
Theme, they could have such an effect.
Just to have in mentioned, you're not alone.... , good Luck! ;)
Ernie
yes I agree with you . if you use additional extensions to your
Theme, they could have such an effect and it happens with me personally
Last edited by OSWorX on Sat Mar 07, 2020 12:51 am, edited 1 time in total.
Reason: removed hidden link

Newbie

Posts

Joined
Sun Dec 09, 2018 2:00 am

Post by barnettgs » Sat Apr 20, 2019 3:43 pm

I have exactly the same issue with OC 3.0.2.0 and here is the picture of order list attached:

Image

Is that to do with the cache issue? The order list showing two same product but one with 2 x milk and the other is 1 x milk but only that 2 x milk isn't included in the total price.

Newbie

Posts

Joined
Thu Sep 16, 2010 3:01 am

Post by azonic » Sun Mar 29, 2020 7:46 am

synapseindia wrote:
Mon Nov 12, 2018 6:56 pm
Hi Guys,

You can fix the issue by adding below code in htaccess file.

Code: Select all

<IfModule mod_headers.c>
	Header set Cache-Control "no-cache, no-store, must-revalidate"
	Header set Pragma "no-cache"
	Header set Expires 0
</IfModule>
Thanks
I had the same issue with Opencart Version 3.0.3.2 and I used this code and it works perfectly now.

Newbie

Posts

Joined
Sun Mar 29, 2020 6:46 am

Post by letxobnav » Sun Mar 29, 2020 5:46 pm

Congrats, that kills any browser caching.

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 straightlight » Sun Mar 29, 2020 8:03 pm

It's already stated in the FAQ anyways.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by lobo@lobo.pe » Mon Apr 06, 2020 11:02 pm

sayahan wrote:
Wed Oct 03, 2018 7:18 pm
Hello,
I had a similar problem. Cause of my problem is browser cache. I writed meta tags for no-cache on header.twig or htaccess mod_header rules but I couldn't get rid of browser cache. At the end of this solution, it is works.
I writed to beginning of file on site root index.php:

Code: Select all

header("Cache-Control: no-cache, must-revalidate");
Normally you can control header with .htaccess but I use multiPHP and I have to use a .htaccess mime_module rule ( AddType application/x-httpd-ea-php56 .php .php5 .phtml ) for php5.6. Because of this rule, Header unset Cache-Control rule not works in .htaccess

I hope this works for you too.
This worked to me, thank you very much!

Newbie

Posts

Joined
Thu Nov 07, 2019 3:47 am

Post by peiyichloe20 » Wed Jun 03, 2020 8:58 pm

synapseindia wrote:
Mon Nov 12, 2018 6:56 pm
Hi Guys,

You can fix the issue by adding below code in htaccess file.

Code: Select all

<IfModule mod_headers.c>
	Header set Cache-Control "no-cache, no-store, must-revalidate"
	Header set Pragma "no-cache"
	Header set Expires 0
</IfModule>
Thanks
hello,
it works! thank you so much

but there is another problem
it works when i adjust the amount by add/minus button
but if i manually enter the designated amount, it doesnt work

do you know how to deal with it then?
thank you so much!

Newbie

Posts

Joined
Fri Feb 14, 2020 4:54 pm
Who is online

Users browsing this forum: No registered users and 5 guests