This content contains older information from our previous Javascript library. Please visit the link if you have implemented Klevu with the latest template JS.
BigCommerce allows merchants to display prices in multiple currencies and also allows to show customer groups wise prices and product visibility. In order to enable the same behavior in the Klevu Search results please follow the steps given below:
Steps for Stencil theme:
- Login into your BigCommerce Admin Panel
- Go to Storefront → My Theme
- Click on the current theme and go to Theme Options → Edit Theme Files
- Go to Templates → Layout & open base.html file.
- Insert the following JS code snippet before the </body>tag
<script> var klevu_isMulticurrencyEnabled = true, klevu_currentCurrencyCode = "{{currency_selector.active_currency_code}}", klevu_loginCustomerGroup = "{{customer.customer_group_id}}" ? "{{customer.customer_group_id}}" : "{{customer_group_id}}", klevu_category = ""; klevu_loginCustomerGroup = klevu_loginCustomerGroup === "0" ? "" : klevu_loginCustomerGroup; klevu_category = klevu_loginCustomerGroup ? "groupid_" + klevu_loginCustomerGroup : ""; </script>
- Click on Save File button
Steps for Blueprint theme:
- Login into your BigCommerce Admin Panel
- Go to Storefront → My Themes
- Click on Edit HTML/CSS
- Open the file Panels/Footer.html
- Insert the following JS code snippet at the end of the file
<script> var klevu_isMulticurrencyEnabled = true, klevu_currentCurrencyCode = "%%GLOBAL_SelectedCurrencyCode%%", klevu_loginCustomerGroup = "%%GLOBAL_CustomerGroupId%%", klevu_category = ""; if (klevu_loginCustomerGroup) { klevu_loginCustomerGroup = klevu_loginCustomerGroup.replace('"', ''); klevu_category = "groupid_" + klevu_loginCustomerGroup; } </script>
- Click on Save File button