Sample Product
Price:
R500.00
Add this script to your html and replace {{ product.price }} with the actual price of the item:
<script id="happypay_script" async
src="https://widgets.happypay.co.za/integrations/shopify_widget.js?amount={{ product.price }}"
type="application/javascript"></script>
Integration Guide
Download Complete Guide
Shopify Integration
- Open the theme code editor on your Shopify backend.
- Find & edit "main-product.liquid" (or "product-template-liquid") under 'Sections'.
- Locate the line "{%- when 'price' -%}", usually around line 91.
- Add the following script below the closing div:
<script id="happypay_script" async
src="https://widgets.happypay.co.za/integrations/shopify_widget.js?amount={{ product.price | money_without_currency | remove: ',' }}"
type="application/javascript"></script>
WooCommerce Integration
- Log in to your WordPress account.
- Navigate to 'WooCommerce' -> "Settings" -> "Payments".
- Click 'Manage' on the Happy Pay gateway.
- Select the option to add the widget.
- Save and test the widget.