Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Loss of sales basket empty
Author « Topic »  

ClaireArt
Advanced Member

101 Posts

Posted - 12/04/2019 :  08:50:22  
Hi I've just almost lost a sale because items are added to the shopping cart but when you click checkout you get this message,

There are currently no items in your shopping cart.
If you would like to get started browsing our store please click here.
Continue Shopping

And what you have added is "missing"

I got around this problem by giving my internet a refresh and clicking f5 but not internet customers are as savvy as me and won't do this. How can I get around this problem? Thank you.

Vince
Administrator

42466 Posts

Posted - 12/04/2019 :  09:48:25  
Hi ClaireArt
The server settings are probably to cache your website pages. This is a problem with dynamic pages in general but with pages like the cart page, what you are seeing is the cached, empty cart rather than the cart with the items in it. Try the cart page URL on the server header checker here...
http://tools.seobook.com/server-header-checker/
Have a look to see if the cache-control / max age etc are for dates in the future. Armed with that you can ask your host if they would remove the cache.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

ClaireArt
Advanced Member

101 Posts

Posted - 12/05/2019 :  01:30:50  
Hi Vince

I got this response from the headline checker - is this correct?

#1 Requesting: https://www.claire-harrison.co.uk/shop/cart.php


Request
> GET /shop/cart.php HTTP/1.1
> Host: www.claire-harrison.co.uk
> User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246
Request failed

Vince
Administrator

42466 Posts

Posted - 12/05/2019 :  03:08:56  
Hi ClaireArt
I get these headers returned (amongst others)...
> expires=Tue, 10-Dec-2019 11:03:05 GMT;
> Max-Age=432000;
This means that the server is going to wait 5 days before serving up fresh content unless forced to do so (by pressing F5 for instance.)
Can you pass that on to your host and ask them how to stop the server doing so, for ALL PHP pages and not just the cart.php page.

Vince


Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

ClaireArt
Advanced Member

101 Posts

Posted - 12/05/2019 :  03:15:55  
Thank you, I raised this issue (about caching) when I built the website months ago with my hosting company, so to say they have just received a stern email about it from me is an understatement!

Thank you for your help :) x

ClaireArt
Advanced Member

101 Posts

Posted - 12/05/2019 :  05:00:35  
Hi Vince,

I have just had this response from my hosting company, please advise what i should reply to them,

We have an update from our senior admins and informed that they were able to replicate this once only and it looks like that was browser cache related. We are unable to replicate using a fresh browser

The possible solution to sort this would be to add a .htaccess file in the /shop section with no-cache code that should prevent browser caching as well.

We haven't added this to your website as we don't know what affect that might have in the shop.

We would suggest you contact the developer of the eCommerce platform to double-check that adding something like no-cache code doesn't cause any issues.

Vince
Administrator

42466 Posts

Posted - 12/05/2019 :  05:09:56  
For the cart, or any dynamic site really you don't want to go setting caches as you get problems such as yours. So however they remove this cache is fine as far as the cart is concerned.
However, saying that I've seen other sites where the cache can be configured via the hosting control panel. I would check that first.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

ClaireArt
Advanced Member

101 Posts

Posted - 12/05/2019 :  05:17:02  
Im sorry I dont understand your reply.
Do you mean that I should not be adding any htaccess that they suggest to the shop?

I am currently pursuing that I want my cache switched off with my hosting company as i originally asked for this in april...

Vince
Administrator

42466 Posts

Posted - 12/05/2019 :  05:32:21  
Hi ClaireArt
Sorry if that was confusing but what I'm saying is first, if you have a hosting control panel have a look to see if there is a "Server Cache" setting, and if so, turn it off. If not then go for the .htaccess solution and see if that works.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

ClaireArt
Advanced Member

101 Posts

Posted - 12/06/2019 :  03:01:55  
Hi Vince,

I have had this response from my hosting company, please advise,

Thank you for your patience whilst we investigated this matter.

We have reviewed this thoroughly and we can see, for the request headers, that no server-side caching is occurring at this time.

You can see, below, that the rules defined in your .htaccess file are being accepted:

Host: http://www.claire-harrison.co.uk
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0
Accept: image/webp,*/*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
DNT: 1
Connection: keep-alive
Referer: https://www.claire-harrison.co.uk/shop/cart.php
Cookie: SERVERID=vhost21-4_www; PHPSESSID=a584710c426c5a9406a68542ce763dde; ectcartcookie=ab1ce71b3069961eab7c77a0d3; ECTTESTCART=9402
Pragma: no-cache
Cache-Control: no-cache

The variable 'PHPSESSID=' is needed naturally, as a session id needs to be stored so that items added to cart and items in cart
show as updated and products are retained in the basket for users.

We ran some tests and where able to replicate your issue by enabling/disabling the browser cache. This would indicate that the issue you are experiencing
is currently being caused by browser caching (client side), and not server side caching at this time.

I would highly recommend that you liaise with your web dev to address the client side caching. The web dev should look to disable the caching via the CMS or
application which they use to maintain and manage the shop integrated into your website.

I hope this information is of help.

Vince
Administrator

42466 Posts

Posted - 12/06/2019 :  09:17:25  
Hi ClaireArt
These are the headers being returned...

quote:
< HTTP/1.1 200 OK
< Server: nginx/1.16.1
< Date: Fri, 06 Dec 2019 17:13:43 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Vary: Accept-Encoding, Accept-Encoding
< X-Powered-By: PHP/7.3.12
< Set-Cookie: PHPSESSID=df2e0ca2e82a7b54edf4f758e1e6e37e;
path=/, ectcartcookie=1951c1e03861a36766f2824645;
expires=Wed, 11-Dec-2019 17:13:43 GMT;
Max-Age=432000;
< Cache-control: private


You can see these here...
http://tools.seobook.com/server-header-checker/?url=https%3A%2F%2Fwww.claire-harrison.co.uk%2Fshop%2Fcart.php&useragent=8&protocol=11

As you can see, the server is set to cache for 5 days.

expires=Wed, 11-Dec-2019 17:13:43 GMT;
Max-Age=432000;

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

ClaireArt
Advanced Member

101 Posts

Posted - 12/07/2019 :  01:16:02  
Hi Vince, thank you for your response. I sent that directly to the hosting company and I have received this message back from them. Can you check that they have done what they should have done, and let me know?

Thank you for contacting support service.

I have adjusted the caching header and it is now showing no-cache

---
Vary: Accept-Encoding
Pragma: no-cache
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Expires: Mon, 10 Apr 1972 00:00:00 GMT
Set-Cookie: SERVERID=vhost21-3_www; path=/
---

It basically means no caching in server side. Please check with developer now.



Phil
ECT Moderator

United Kingdom
7622 Posts

Posted - 12/07/2019 :  01:22:31  
Hi Claire,
That looks good to me

#1 Requesting: https://www.claire-harrison.co.uk/shop/cart.php


Final response
< HTTP/1.1 200 OK
< Server: nginx/1.16.1
< Date: Sat, 07 Dec 2019 09:21:28 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Vary: Accept-Encoding, Accept-Encoding
< X-Powered-By: PHP/7.3.12
< Set-Cookie: PHPSESSID=9bd4bccf5d7ce327ed0b743d66d55b32; path=/, ectcartcookie=30ec0d5989ddeafa144e4b6ed2; expires=Thu, 12-Dec-2019 09:21:28 GMT; Max-Age=432000; path=/, ectcartcookie=77511cf005fc8a62dc021faea2; expires=Thu, 12-Dec-2019 09:21:28 GMT; Max-Age=432000; path=/, ectcartcookie=678483c2db693cda59451f6c44; expires=Thu, 12-Dec-2019 09:21:28 GMT; Max-Age=432000; path=/, ectcartcookie=548ebec5c1a0a1c87a4bbc9964; expires=Thu, 12-Dec-2019 09:21:28 GMT; Max-Age=432000; path=/, SERVERID=vhost21-4_www; path=/
< Expires: 0
< Pragma: no-cache
< Cache-Control: max-age=0, no-cache, no-store, must-revalidate



* Database Migrations and Conversions*
* ASP to PHP Cart Conversions*

*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000