Shopping Cart
Notifying Clerk.js about changes to the shopping cart.
Some functionality like specific trigger emails relies on Clerk.io knowing the content of a visitors shopping cart.
Clerk.js enables you to easily keep us updated about shopping cart changes through a JavaScript interface.
Method | Action |
---|---|
Clerk('cart', 'add', 1234); | Tells Clerk.io that product with id 1234 has been added to the shopping cart. |
Clerk('cart', 'remove', 1234); | Tells Clerk.io that product with id 1234 has been removed to the shopping cart. |
Clerk('cart', 'set', [1234, 5678, 42]); | Tells Clerk.io that the shopping cart now contains 3 products with the ids 1234 , 5678 and 42 . |
Updated about 4 years ago