Skip to main content

Cart synchronization across devices

Screenshot_2020-04-29_at_19.12.41.png Getting started

In this article, you can find information about cart synchronization across devices functionality. This change allows you to add the selected products and a discount code to the cart from the URL. Products and a discount code need to exist, and be properly configured in the admin panel - if they are not, they won't be added.

info2.svg  RememberYou can find more about products in the Product management article.

info2.svg  RememberYou can find more about discount codes and the promotion module in the Promotion module introduction article.

Table of contents:

  1. Structure of the URL

 

Screenshot_2020-04-29_at_19.12.41.png Structure of the URL

This functionality adds the /restore/ function into the cart URL with the following parameters:

  • skus - Adds the selected SKUs to the cart. There can be multiple SKUs separated by commas. Only quantity of 1 of the selected products will be added if the amount of products is not specified in brackets (e.g. 39959(3) will add 3 times 39959). If the selected product already exists in the cart its quantity won't increase. Gifts can be added to the cart this way. Example: https://pluat-v6.yr.tauceti.tech/cart/restore/skus/39959(2),55665
  • code - Adds the selected main discount code to the cart. The discount code has to exist and be used by a promotion. Example: https://pluat-v6.yr.tauceti.tech/cart/restore/code/TEST123
  • clear - Removes all of the products from the cart that are not present in the same skus parameter. It's a bool, so 1 removes the products. Example: pluat-v6.yr.tauceti.tech/cart/clear/1

Both of these options can be used simultaneously, which would result in adding the selected products and discount code to the cart.

Example:

https://pluat-v6.yr.tauceti.tech/cart/restore/skus/99291(4),30132/code/TEST123/clear/1