The integration instructions are for Miva Merchant. Zinrelo program can be easily integrated with a Miva Merchant. With this, you can activate Zinrelo Rewards program on your Miva Merchant store and start running the rewards program in matter of minutes.

Setup instructions for integrating Zinrelo Rewards program on Miva Merchant store

It is recommended that:

  1. You take complete backup of your Miva Merchant store.
  2. You should do the integration on your Test Server first, and then do the integration on your Production Server.

Steps to integrate Zinrelo Rewards program into Miva Merchant store are given in section below. Please follow the steps in the same order.

Integrating Zinrelo Rewards program

To integrate Zinrelo Rewards program, please follow steps given below:

1. Login to Miva Merchant Admin.

2. Click Menu.

3. Click on User Interface.

4. Click on Settings.

5. Go (scroll) to Global Header & Footer Section, and copy and paste below code snippet in footer section.

Note: In code snippet you will need to replace the partner ID with the ID assigned to you. You can get your partner ID in your Zinrelo admin console in the General >> Settings section. 

'partner_id' :'XXXXXXXXXX'

Js

<script type="text/javascript">
window._zrl = window._zrl || [];
        var init_data ={'partner_id' :'XXXXXXX','email' : '&mvte:global:customer:bill_email;','name' : '&mvte:global:customer:bill_fname; &mvte:global:customer:bill_lname; ','user_id': '<mvt:if expr="g.basket:cust_id GT 0">&mvt:global:basket:cust_id;</mvt:if>'};
        _zrl.push([ 'init' , init_data ]);
        <mvt:if expr="l.settings:page:code EQ 'INVC'">
            var products = [];
            <mvt:foreach iterator="z_orderitem" array="order:groups">
                products.push
                ({
                    'product_id' :'&mvt:z_orderitem:code;',
                    'price' :'&mvt:z_orderitem:price;',
                    'quantity' : '&mvt:z_orderitem:quantity;',
                    'title': JSON.stringify("&mvt:z_orderitem:name;"),
                    'url':'http://&mvt:global:domain:name;/store/&mvt:z_orderitem:code;.html',
                    'img_url':'http://&mvt:global:domain:name;/store/&mvt:z_orderitem:thumbnail;',
                    'category':'',
                    'tags':'',
                });
            </mvt:foreach>
            var order_data =
            {
                'order_id' : '&mvt:order:id;',
                'total' : '&mvt:order:total;',
                'subtotal' : '&mvt:order:subtotal;',
                'coupon_code' : 'NA',
                'currency': 'USD',
                'products' : products
            };
            _zrl.push([ 'track_order' , order_data ]);
        </mvt:if>
</script>
<script src="//cdn.zinrelo.com/js/all.js" type="text/javascript"></script>
 

Once you are done with this, test the integration.

Happy Testing!

Did this answer your question?