Slide Cart callbacks and methods

Slide Cart has a bunch of callbacks and methods you can use to implement custom code. The full list can be found below:

Callbacks

window.SLIDECART_LOADED = function(cart) {
  // Fires once the cart has loaded
}

window.SLIDECART_UPDATED = function(cart) {
  // Fires whenevr slide cart has updated
}

window.SLIDECART_ADD_TO_CART = function({ id, quantity }) {
  // Fires whenever an item has been added to cart
}

window.SLIDECART_OPENED = function() {
  // Fires whenever Slide Cart has been opened
}

window.SLIDECART_CLOSED = function() {
  // Fires whenever Slide Cart has been closed
}

window.SLIDECART_REMOVED_FROM_CART = function({ id }) {
  // Fires whenever an item is removed from cart
}

window.SLIDECART_CHECKOUT = function() {
  // Fires whenever checkout is clicked
}

window.SLIDECART_UPSELL_ADD = function(id) {
  // Fires whenever an upsell item is added to cart
}

Methods 

// Open slide cart
window.SLIDECART_OPEN()

// Close Slide Cart
window.SLIDECART_CLOSE()

// Update Slide Cart (refetches the cart object)
window.SLIDECART_UPDATE(callback)

// Manually update the cart object
window.SLIDECART_SET_CART(cart)

// Manually apply a coupon code
window.SLIDECART_APPLY_DISCOUNT(coupon_code)

// Get Slide Carts state.
window.SLIDECART_STATE()

Still need help? Contact Us Contact Us