Home Integration Methods Virtue Mart

Virtue Mart

Integration with Virtue Mart is made by placing sale tracking script into the confirmation page.
1
Edit template
Find and open file checkout.thankyou.php

It should be in administrator/components/com_virtuemart/html/
2
Integration
Replace last ?> with following code
This code will track subtotal of the price (with coupon discount). If you want to track something else, you can use one of this variables:
order_total, order_subtotal, order_tax, order_shipping, order_shipping_tax, coupon_discount, order_discount, order_status, customer_note

Use it in the way as it is showed in the code above in the third line.
3
Separated products
There is also possibility to generate unique transaction in PAP for every product type. With this you will have ability to edit separate product types within one order. It is useful if any refund occur. Then you will decline just one transaction (commission) assigned to product type that was refunded.
In this case please use this integration code instead of code above:
If you want to see name of item instead of number of item use variable 'order_item_name' instead of 'product_id' in this line: $pap_product_id[$i] = $db->f('product_id');
4
Finished
It is now integrated. Every time customer enters the order confirmation page the tracking code is called and it will register a sale for referring affiliate.
5
Version 1.4
It seems like the version 1.4 needs edit of other file - checkout.result.php

It is a suggestion from one of our customers, we didn't test it.
6
Virtue Mart with PayPal
In case you are using VirtueMart with PayPal in your Joomla, you have to do some special steps to make integration working. First, in administrator/components/com_virtuemart/notify.php (at your server) add lines below line with code: if ($_POST) {
Now save the file and login to your Joomla.
7
VirtueMart with PayPal
Navigate to Components> VirtueMart> Store> List Payment Methods> PayPal> Configuration> Payment Extra Info and add on of these lines:
Insert it below line with "notify_url"=>...