Custom Variables (Defined in snippets/subscribfy-custom.liquid)
window.exmDev = 1;
window.SUBSCRIBFY_store_credits = 1;
window.SUBSCRIBFY_nocartitemprice = 1;
window.SUBSCRIBFY_cart_total = '[css selector of element that has the theme cart total]';
window.SUBSCRIBFY_plus_discount_cartsummary_block = ".cart-subtotal__plus-discount";window.SUBSCRIBFY_plus_discount_cartsummary_value = ".cart-subtotal__plus-discount .js-plus-discount";window.SUBSCRIBFY_cartsummary_subtotal_label = "Order Total (USD)";
window.SUBSCRIBFY_cartsummary_discount_label = "VIP Discount";
window.SUBSCRIBFY_a_vip_checkout_button = 1;
<a> element instead of <button>.window.SUBSCRIBFY_CCLR_TRIGGER_SELECTOR = '.top-account-menu__item .top-account-menu__button';
window.SUBSCRIBFY_CLR = 1;
window.SUBSCRIBFY_CLR_errors_selector = '.errors';
window.SUBSCRIBFY_no_reload_on_add_to_cart_page = 1;
window.SUBSCRIBFY_GUESTCHECKOUT = 1;
Events from the Theme to APP
Cart changed:
document.dispatchEvent(new CustomEvent('subscribfy:triggerUpdateExmCartItems', {'detail': { vip: 1 }}));Clicked VIP Option:
console.log(" -- click VIP ----");document.dispatchEvent(new CustomEvent('subscribfy:triggerDoCartWidgetClickedVip', {'detail': { forSideCart : 0 }}));