What if I'm having "add to cart" functionality on my product detail page and I want to share shopping carts between AMP and canonical website?

I've tried to look at the e-commerce documentation on amp.dev. There is a way to save shopping cart to backend with ClientID variable substitution:

<input name="clientId" type="hidden" 
  value="CLIENT_ID(cart)" data-amp-replace="CLIENT_ID">

But then it is needed to redirect the user to shopping cart on canonical page.

It seems to be intended to share e-shop carts only between AMP pages:

…this enables storing a shopping cart between repeated visits of an AMP page (either via the AMP Cache or the original host).

Is there a way to share the cart between AMP and non-AMP?

0 Answers