My demo does not work on preview as expected

Please, compare

And live preview from CodeCanyon

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.


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?

yes, you are right. in chrome not working.

Please, check comment from " hoofpick"

May be issue in SSL

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.