Payflex Widgets Prod

Payflex offers merchants a number of helpful & informative widgets, which display more information about the product to site customers. The widgets are really easy to load onto the relevant pages, and should be able to completed by most merchant site admins.

If you are having any issues implementing these on your site, please contact support@payflex.co.za

Simple Usage - Calculator / More Info

Simply insert a <script> tag, as defined below, onto the part of the page that is the right place for this to be displayed.

Base Url : https://widgets.payflex.co.za/your-merchant-name/partpay-widget-0.1.3.js?type=calculator

Parameters

Name Description
min Your minimum Payflex amount
max Your maximum Payflex amount
amount The order or cart amount

Demo

(*item / cart worth R300)

<script async src="https://widgets.payflex.co.za/your-merchant-name/partpay-widget-0.1.3.js?type=calculator&min=50&max=400&amount=300" type="application/javascript"></script>

WooCommerce

When using this widget on WooCommerce, you can pass the following values for the amount parameters.

Parameters

WooCommerce Page Value
Cart WC()->cart->cart_contents_total;
Product WC()->product-> get_price();

i.e (product page). <script async src="https://widgets.payflex.co.za/partpay-widget-0.1.3.js?type=calculator&min=50&max=400&amount=<?php echo $product->get_price(); ?>" type="application/javascript"></script>

Shopify

If you want to show the logo with purple background then use logoType=1 and if you want to show the logo with transparent background then use logoType=2

When using this widget on shopify, you can pass the following values for the amount parameters.

Parameters

(product page).
{%- if product.variants[0] -%}
{%- assign priceforwidget = product.variants[0].price -%}
{%- else -%}
{%- assign priceforwidget = product.price -%}
{%- endif -%}
<script async src="https://widgets.payflex.co.za/partpay-widget-shopify.js?type=calculator&min=10&max=20000&logoType=1&amount={{ priceforwidget | money_without_currency | remove: ',' }}" type="application/javascript"></script>