onCartCreated( )

Deprecated. This event will continue to work until September 4, 2024, but a newer version is available at wix-ecom-backend.Events.onCartCreated().

We recommend you migrate to the new Wix eCommerce APIs as soon as possible.

For more info about the differences between the Stores Cart and eCommerce Cart, refer to the cart conversion table.

An event that fires when a cart is created.

The onCartCreated() event handler runs the first time a site visitor adds a product to their shopping cart.

Removing all items from the cart and adding a new item does not create a new cart and does not trigger this event.

Note: Backend events don't work when previewing your site.

Method Declaration
Method Parameters

Information about the cart that was created.

Was this helpful?