Skip to content

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.

Example values
const shopify = window.Convermax.Shopify;
// Current page
shopify.getPageType(); // 'product'
shopify.getPageId(); // 148170408252
shopify.getCollectionId(); // 505753600316
shopify.getProductId(); // 10070528983356
shopify.getProductType(); // 'Air filter'
shopify.getVariantId(); // 51814831980860
// Customer
shopify.getCustomerId(); // 6690317303860
shopify.getCompanyId(); // 2020474932
shopify.getCompanyLocationId(); // 2062745652
// Market
shopify.getCountry(); // 'US'
shopify.getCurrency(); // 'USD'
shopify.getLocale(); // 'en'
// URLs
shopify.getRootRoute(); // ''
shopify.getSearchPageUrl(); // '/pages/search'
shopify.getCollectionsPageUrl(); // '/collections'
shopify.getCartUrls();
// {
// root: '/cart',
// add: '/cart/add',
// change: '/cart/change',
// clear: '/cart/clear',
// update: '/cart/update',
// }