Using Slide Cart with Bold Subscriptions

Slide Cart is compatible and can be used with Bold Subscriptions. It should mostly work out of the box, but an additional snippet needs to be added in order to fix the prices in cart.

Pre-requisites:

  1. Make sure you've installed the fast-install snippet. Detailed instructions can be found here.

Once the pre-requisites have been met place the following snippet below the fast install snippet.

<script>
  window.SLIDECART_UPDATED = function (cart) {
    if (
      typeof window.BOLD !== "undefined" &&
      typeof window.BOLD.common !== "undefined" &&
      typeof window.BOLD.common.cartDoctor !== "undefined"
    ) {
      var c = cart
      var newCart = window.BOLD.common.cartDoctor.fix(cart)

      for (var i = 0; i < newCart.items.length; i++) {
        var item = newCart.items[i]

        c.items[i].line_price = item.line_price
        c.items[i].original_line_price = item.original_line_price
      }

      c.total_discount = c.total_discount + (cart.total_price - newCart.total_price)
      c.total_price = newCart.total_price;

      window.SLIDECART_SET_CART(c);
    }
  };
</script>

If you need help or it's not working, do not hesitate to reach out.

Stay in the loop

Sign up for the AppHQ newsletter! We'll keep you up to date on app releases, updates, and blog postings.