My demo does not work on preview as expected

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.

Oh it works in FireFox. Could you try in Chrome, please?
https://codecanyon.net/item/ajax-cart-very-fast-no-page-reloading-many-features-responsive-and-mobile-skin/full_screen_preview/17109430?_ga=2.30509759.1867622574.1616876733-396633985.1589134164

yes, you are right. in chrome not working.

Please, check comment from " hoofpick"
https://codecanyon.net/item/ajax-cart-very-fast-no-page-reloading-many-features-responsive-and-mobile-skin/17109430/comments?page=3&filter=all#comment_26377972

May be issue in SSL
http://preview.codecanyon.net/item/ajax-cart-very-fast-no-page-reloading-many-features-responsive-and-mobile-skin/full_screen_preview/17109430?_ga=2.144822324.1495316275.1616878814-396633985.1589134164

It is not HTTPS.

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.