Storefront SDK
You can use ShopBase Storefront SDK to access shop data, listen to shop events like add to cart, update cart quantity, etc.
Ready
window.sbsdk.ready(function() {
console.log('ready');
});Get content
window.sbsdk.page.getContext() // { type: 'product', payload: { id: 1 }}window.sbsdk.product.current() // { id: 1000000003239458, title: "T-shirt" }window.sbsdk.cart.get() // { token: '', items: [], subtotal_price: 0, total_price: 0 }window.sbsdk.user.get() // { id: 1 }Events
Actions
Navigate to sign in
Navigate to sign up
Navigate to checkout
Last updated