Convermax JS Helpers for Shopify stores
window.Convermax.Shopify gives your JS code access to Liquid values. A helper returns undefined when its value doesn’t apply to the current page, such as getProductId() outside a product page.
const shopify = window.Convermax.Shopify;
// Current pageshopify.getPageType(); // 'product'shopify.getPageId(); // 148170408252shopify.getCollectionId(); // 505753600316shopify.getProductId(); // 10070528983356shopify.getProductType(); // 'Air filter'shopify.getVariantId(); // 51814831980860
// Customershopify.getCustomerId(); // 6690317303860shopify.getCompanyId(); // 2020474932shopify.getCompanyLocationId(); // 2062745652
// Marketshopify.getCountry(); // 'US'shopify.getCurrency(); // 'USD'shopify.getLocale(); // 'en'
// URLsshopify.getRootRoute(); // ''shopify.getSearchPageUrl(); // '/pages/search'shopify.getCollectionsPageUrl(); // '/collections'shopify.getCartUrls();// {// root: '/cart',// add: '/cart/add',// change: '/cart/change',// clear: '/cart/clear',// update: '/cart/update',// }
