When Add a new item to cart and go to homepage or any-other page the cart goes to be 0 and when go product page the cart refresh again ..
i tried everything i could
1- turn the host cache off
2- clear cpanel cache
3- clear opencart admin cache
4- restore htaccess to default
5- clear browser cache
nothing helped me out .
i didn't install any new extensions
i use journal 3 theme
opencart 3.0.3.2 latest version
my website link e-electra.com
please help me
open chrome developer tools->network->disable cache and try again.
if the issue is gone, you are not sending the correct caching headers to the browser.
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.
Turns out we were moved onto a Varnish server - absolutely wonderful for speed, but nothing we tried made it useable for a cart. It is supposed to work - we didn’t find anything for opencart, but there is info about it for wordpress ( for example - https://docs.easydigitaldownloads.com/a ... th-varnish) - None of these worked, at least not a few years ago. Finally, we move off the varnish server and voila - worked ..
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
cache-control: public, max-age=1
cf-ray: 4fca51a88dc8784e-LAX
content-encoding: br
content-type: text/html; charset=utf-8
date: Fri, 26 Jul 2019 23:57:59 GMT
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-c ... /expect-ct"
expires: Fri, 26 Jul 2019 23:58:00 GMT
server: cloudflare
set-cookie: OCSESSID=4be54b63b49cb7ff1c0feed7ab; path=/
status: 200
vary: Accept-Encoding
x-powered-by: PHP/7.0.33
x-turbo-charged-by: LiteSpeed
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.
@letxobnav thank you for that - may I pick your brains on that please. How would you set that up specifically for the cart dropdown OC3.0.3.2 for example?
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
So you could send no-cache headers on each individual page and each individual ajax call result like the cart info popup but you might as well set those headers in the response class itself in framework.php
Code: Select all
// Response
$response = new Response();
$response->addHeader('Content-Type: text/html; charset=utf-8');
$response->setCompression($config->get('config_compression'));
$registry->set('response', $response);
Code: Select all
// Response
$response = new Response();
$response->addHeader('Content-Type: text/html; charset=utf-8');
$response->addHeader('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
$response->addHeader('Pragma: no-cache');
$response->setCompression($config->get('config_compression'));
$registry->set('response', $response);
On a side note, if you install 3rd party cache extensions which circumvent the standard response class or start caching after that class has produced it output or starts sending cache headers that override previously send cache headers, then all bets are off.
Journal themes seem to have a knack for over-caching to compensate for their poor performance due to their bulk designs.
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.
That works as well.
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.
Thank you so very much
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Users browsing this forum: Amazon [Bot] and 18 guests