Hi,
I have found a code in order to track sale but cannot able to add it in x-cart page.
This is the code they have supplied-
Copy first code snippet and paste it in the footer section of your template.
HTML Code:
<script type="text/javascript">var showButton = true;</script>
<script type="text/javascript">var apiKey = "169779d3852b32ce8b1a1724dbf5217d";</script>
<script type="text/javascript" src="//cdn.refiral.com/libs/refiral-1.0.min.js"></script>
and Copy second code snippet and paste it in the footer of your checkout page.
HTML Code:
<script type="text/javascript">var showButton = false;</script>
<script type="text/javascript">var apiKey = "169779d3852b32ce8b1a1724dbf5217d";</script>
<script type="text/javascript" src="//cdn.refiral.com/libs/refiral-1.0.min.js"></script>
<script type="text/javascript">
var customer_name = "CUSTOMER_NAME"; // Replace CUSTOMER_NAME with the customer name
var customer_email = "CUSTOMER_EMAIL"; // Replace CUSTOMER_NAME with the customer email
var grandTotal = "GRAND_TOTAL"; // Replace GRAND_TOTAL with the total amount of the bill of customer
var subTotal = "SUBTOTAL"; // Replace SUBTOTAL with the subtotal amount of the bill of customer
var couponCode = "COUPON_CODE"; // Replace COUPON_CODE with the coupon code applied by customer. Leave it blank if no coupon code is applied.
var order_id = "ORDER_ID"; // Optional
var currency = "CURRENCY"; //Optional
// Push all products to refiral_cart_items array
var refiral_cart_items = [];
refiral_cart_items.push({
product_id: "P1", // Product ID
quantity: "2", // Quantity
name: "Product 1", // Name of product
});
refiral_cart_items.push({
product_id: "P2", // Item Product ID
quantity: "1", // Item Quantity
name: "Product 2", // Name of product
});
invoiceRefiral(subTotal, grandTotal, couponCode, refiral_cart_items, customer_name, customer_email, order_id, currency);
</script>
Now please suggest me where to add.
Thanks,
xtech