Home
Integration Methods
Virtue Mart 2
This integration method is for Virtue Mart version 2. If you have lower version, please navigate to the integration method named "Virtue Mart".
1
Virtue Mart with PayPal in Joomla
First step is to edit file /plugins/vmpayment/paypal/paypal.php of your Joomla installation. Find function plgVmConfirmedOrder($cart, $order) and in the function find line
$html.= '</form>';
Now replace this line with this code:
2
Virtue Mart with PayPal in Joomla
Now one more change is needed - find line
$html.= '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />';
and replace it with this:
Now save your work, there is another step to be done.
3
Virtue Mart with PayPal in Joomla
Final step is to resend response from PayPal to Post Affiliate Pro. To do this, find this line in the same file:
function _processIPN($paypal_data, $method) {
Add this code right below this line (create a new blank line) and past the code there:
This is it. Now save your file and upload it back to the server. Do not forget to enable PayPal plugin in your Post Affiliate Pro.
10
Virtue Mart with COD in Joomla
In case of Cash on delivery (COD) you have to modify the file /plugins/vmpayment/standard/standard.php and insert the sale tracking code there.
Find the line:
return $this->processConfirmedOrderPaymentResponse(true, $cart, $order, $html);
and paste this code above that line:
That's it. Save your work and upload it back to the server.
Here is a list of all variables you can use:
$order['details']['BT']->order_total
$order['details']['BT']->order_subtotal
$order['details']['BT']->tax
$order['details']['BT']->coupon_discount
$order['details']['BT']->coupon_code
$order['details']['BT']->order_status
Do not forget to integrate the click tracking code, to make the sale tracking work correctly.