Please, compare
http://demo.spa-cart.com
And live preview from CodeCanyon
http://preview.codecanyon.net/item/ajax-cart-very-fast-no-page-reloading-many-features-responsive-and-mobile-skin/full_screen_preview/17109430?_ga=2.247541440.692279552.1616868713-1520226391.1616868592
If you add item to cart
See screenshot - item is added. It says at the top/right “Products: 1”. But on open cart it is empty.
So not sure - I will try to fix but not sure why it does not work from iframe.
Just I have checked both live preview ink and direct link. both are perfect from my side. showing cart item.
Hello,
If you are on Preview in Chrome for example - you need to click to add item to cart, next open cart from top right links.
Session is not saved inside iFrame.
yes I did that in FF and all is fine.
yes, you are right. in chrome not working.
yes, your demo server is not running with ssl (https). so live preview link working according to your demo url https/http. you can turn https in your hosting and hope the issue will solve.
Hi @olegkhorev,
This issue is due to how Chrome handles cookies, specifically around the SameSite
and Secure
attributes on the cookie. Staring with Chrome version 85, cookies which don’t set SameSite=None
and don’t have the Secure
flag set will be dropped when loaded across domains.
When loaded through the preview iframe, your demo site is considered cross-domain, so you need to set SameSite=None
, set the Secure
flag, and serve your demo page over HTTPS.
There’s a discussion of this issue in another thread:
Hopefully this gives you the information you need. We are investigating alternative mechanisms for serving the preview without an iframe, but for now you’ll need to make the above adjustments if you want to keep serving cookies to your demo users.