Skip to main content
Smart Cart Advanced Settings

Listening for Smart Cart Events

Christian Sokolowski avatar
Written by Christian Sokolowski
Updated over 3 months 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

  1. Access the settings option:

    • In the left navigation bar in the Smart Cart settings, scroll down and click on the "Settings" option at the bottom.

  2. Locate the advanced settings:

    • Within the settings, you will find an "Advanced Settings" section.

  3. Enable or disable advanced settings:

    • Adjust the advanced settings according to your preferences which include:

      • Theme selectors

      • Cart attribution tracking

      • Custom CSS

      • Event listeners

      • Custom templates


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?