Skip to content

Convermax JS Helpers for Shopify stores

You can use our JS Helpers to easily access Liquid variables in your JS code.

  • window.Convermax.Shopify.getCartUrls();

    The cart page and cart API endpoint URLs

    {
    "root": "/cart",
    "add": "/cart/add",
    "change": "/cart/change",
    "clear": "/cart/clear",
    "update": "/cart/update",
    }
  • window.Convermax.Shopify.getCollectionId();

    ID of the currently open collection.

    505753600316;
  • window.Convermax.Shopify.getCollectionsPageUrl();

    Return the collections list page URL.

    '/collections';
  • window.Convermax.Shopify.getCountry();

    The ISO code of the currently selected country.

    'US';
  • window.Convermax.Shopify.getCurrency();

    The currency used in the currently selected country.

    'USD';
  • window.Convermax.Shopify.getCustomerId();

    The ID of the customer.

    6690317303860;
  • window.Convermax.Shopify.getCompanyId();

    The ID of the customer’s company.

    2020474932;
  • window.Convermax.Shopify.getCompanyLocationId();

    The ID of the customer’s company location.

    2062745652;
  • window.Convermax.Shopify.getLocale();

    The currently selected language on the storefront in IETF language subtag format.

    'en';
  • window.Convermax.Shopify.getPageId();

    ID of the currently open page.

    148170408252;
  • window.Convermax.Shopify.getPageType();

    The type of the currently open website page in Shopify format.

    'home';
  • window.Convermax.Shopify.getProductId();

    ID of the currently open product.

    10070528983356;
  • window.Convermax.Shopify.getProductType();

    Type of the currently open product.

    'Air filter';
  • window.Convermax.Shopify.getRootRoute();

    The home page URL.

    '/';

    This may help to get the route for the selected language.

    '/fr';
  • window.Convermax.Shopify.getSearchPageUrl();

    The default Convermax Search page URL.

    '/pages/search';
  • window.Convermax.Shopify.getVariantId();

    The ID of the currently selected or first available variant of the open product. The selected variant is determined by the variant URL parameter.

    51814831980860;