Skip to main content
All CollectionsBundle BearBundle Bear JS API
Extending Bundle Bear with custom Javascript
Extending Bundle Bear with custom Javascript
Mollie Herbert avatar
Written by Mollie Herbert
Updated over a week ago

Using the app global conversionBundlesBear window object you can invoke several methods and bind callbacks to help you tailor Bundle Bear to your store needs.

The JS SDK module will be available whenever the app is enabled from the app settings.

The following methods can be added to the app settings using the custom JS input box that is available in the app advanced tab.



Use this method to trigger an update of the cart discounts element that is displayed in the storefront cart page. In case you would like to update an ajax cart discount element update pass in a boolean value of true e.g.




Use this method to redirect the customer to checkout with the relevant Bundle Bear discount if applicable.



Attach a callback function that will be triggered when a bundle offer is added to cart using the product widget.

For example:




Attach a callback function that will be triggered while the customer is navigating to checkout.

For example:

conversionBundlesBear.setOnGoToCheckout((discountData)=>{console.log(discountData);return true; // this will make Bundle Bear continue after this callback is executed});

Need anything custom for your use case? Let us know and we'll add it to our wishlist!

Did this answer your question?