Smart Cart Advanced Settings

Listening for Smart Cart Events

Christian Sokolowski avatar
Written by Christian Sokolowski
Updated over a week ago

Event Listeners

There are the events that are activated during the lifecycle of the Smart Cart. As the Smart Cart is an extension of the cart object, several of the Cart events can be employed to assist in extra functionalities, such as the 'rebuy:cart.change' event. This event becomes useful when conditional updates are required for items that are either present or absent in the cart.

Furthermore, these events can be accessed as anonymous functions within the Smart Cart settings, located in the 'Advanced' section at the bottom of the settings page. This approach eliminates the necessity for modifications to the theme code, allowing these functions to be enabled or disabled with a simple button click.

Many developers have utilized these events to offer additional manipulation or creation of the Document Object Model (DOM) without resorting to a custom template for the Smart Cart. If necessary, adjustments to the data within the Smart Cart function can also be made to manipulate the Smart Cart settings."

Smart Cart Event Callbacks

Instance-based event callbacks are automatically activated when specific events occur, enabling you to associate these events with your theme. In other words, when certain actions take place, these callbacks are automatically set into motion without you having to manually initiate them. This capability allows you to establish a connection between events and the visual presentation or behavior of your theme.

Enabling Smart Cart Advanced Settings

Navigate to your smart cart settings, scroll down to the bottom of the page and toggle the "advanced" section. From there, you can utilize the multiple callbacks we have available.

Event Listeners & Callback Capabilities

For more information on our current event listeners and callbacks, you can review our developer documentation which will outline what each of the available options does.

Did this answer your question?