Installation Guide – Shopify

Step 1
Login into admin panel of store.

arrow

Step 2
Go to online stores & click on edit code.

arrow

Step 3
Find the product template liquid file and put the below code where you want to display the product level tooltip.

{% comment %}PLEASE DO NOT REMOVE BELOW CODE. {% endcomment %}
{% assign DivideBuy = shop.metafields.DivideBuy %}
{% assign DivideBuyEnableFlagKey = 'DivideBuyEnableFlag' %}
{% assign DivideBuyFlag = DivideBuy[DivideBuyEnableFlagKey] %}
{% if DivideBuyFlag != '0' %}
{% include 'dividebuyproduct' with products[0] %}
{% endif %}

arrow

Step 4
Find cart.liquid file and put the below code where you want to display the dividebuy button.

{% comment %}PLEASE DO NOT REMOVE BELOW CODE. {% endcomment %}
{% assign DivideBuy = shop.metafields.DivideBuy %}
{% assign DivideBuyEnableFlagKey = 'DivideBuyEnableFlag' %}
{% assign DivideBuyFlag = DivideBuy[DivideBuyEnableFlagKey] %}
{% if DivideBuyFlag != '0' %}
{% include 'dividebuycart' %}
{% endif %}

arrow

Step 5
Open dividebuy product.liquid file and find the variable price_a and replace the id or class with your product price’s class or id.

You can check find below code in same file
var price_a = jQuery('#ProductPrice-product-template').html().replace(' {{shop.money_format | slice: 0 }} ','');

Modify the code as explained below.
var price_a = jQuery('#Your product price’s class or id ').html().replace(' {{shop.money_format | slice: 0 }} ','');

 

arrow

Step 6 (Shopify Plus)
Find checkout.liquid and put below code before end of <body> tag.

You can check find below code in same file
{% comment %}Adding DivideBuy payment gateway description{% endcomment %}
{{'dividebuy-style.css' | asset_url | stylesheet_tag}}
{{'checkout_script.js' | asset_url | script_tag}}
{{'dividebuy.js' | asset_url | script_tag}}
{{'dividebuy-checkout.js' | asset_url | script_tag}}
{%comment %}Getting instalment values {% endcomment %}
{% assign installment_details = shop.metafields.Installmentdetails %}
{% assign installment_K_details = 'keyInstallmentdetails' %}
{% assign installMents = isntallment_details[installment_K_details] %}
<script type="text/javascript">
var installMents = unserialize('{{ installMents }}');
var minimumOrder = getOrderAmount(installMents);
displayDivideBuyPaymentDescription(minimumOrder, installMents);
</script>
{% if checkoutLevelSoftCreditBanner == '1' %}
<script type="text/javascript">
var retailerBaseUrl = 'https://{{shop.permanent_domain}}';
var minimumOrder = getOrderAmount(installMents);
minimumOrder = parseFloat(minimumOrder).toFixed(2);
displaySoftCreditPopupCheckout(retailerBaseUrl,minimumOrder);
</script>
{% endif %}

Was this page helpful?

Page last updated: 11 March 2022

Win a luxurious Swyft armchair worth up to £895!

Ends 31st of December 2023

Our merchant partner Swyft is giving one lucky winner a Model 01 or Model 02 armchair worth up to £895. These bestselling armchairs sit on a solid wood plinth and come in a variety of fabrics and colours.

Throw your name in the hat to win and sign up now! 

Skip to content