Virtue Mart 3 integration
A free e-commerce solution.
This integration method is for Virtue Mart version 3. If you have a lower version, please navigate to the integration method named “Virtue Mart 2”.
Integrate offline payments (cash)
Open file plugins/vmpayment/standard/standard.php and find function plgVmConfirmedOrder.
At the end of it, there is a line $cart->emptyCart – place the following code above it:
/* Post Affiliate Pro integration snippet */
$html .= '<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">'."PostAffTracker.setAccountId('Account_ID');
var sale = PostAffTracker.createSale();
sale.setTotalCost('".$order['details']['BT']->order_subtotal."');
sale.setOrderID('".$order['details']['BT']->order_number."');
sale.setData1('".$order['details']['BT']->email."');
PostAffTracker.register();
</script>";
/* Post Affiliate Pro integration snippet */
Save your work.
Integrate online payments
Open file administrator/components/com_virtuemart/plugins/vmpsplugin.php and find function processConfirmedOrderPaymentResponse.
Add the following code to it’s beginning:
/* Post Affiliate Pro integration snippet */
$html .= '<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">'."PostAffTracker.setAccountId('Account_ID');
var sale = PostAffTracker.createSale();
sale.setTotalCost('".$order['details']['BT']->order_subtotal."');
sale.setOrderID('".$order['details']['BT']->order_number."');
sale.setData1('".$order['details']['BT']->email."');
PostAffTracker.register();
</script>";
/* Post Affiliate Pro integration snippet */
That’s it, it’s integrated.
Do not forget to integrate the click tracking code, to make the sale tracking work correctly.

Explore seamless integrations with Post Affiliate Pro to enhance your affiliate marketing strategies. Discover solutions for e-commerce, email marketing, payments, and more, with easy integrations for platforms like 1&1 E-Shop, 2Checkout, Abicart, and many others. Optimize your affiliate network with these powerful tools.
Effortlessly integrate your e-commerce site with Post Affiliate Pro and boost your affiliate program's success. Our expert team ensures seamless integration with your payment processor, handling technical issues along the way. Enjoy a free trial and free integration service, saving you time and maximizing your ROI. Join now and experience top-notch affiliate management with over 500 integration options.
Discover Post Affiliate Pro's flexible pricing plans tailored to fit your business needs, with options for Pro, Ultimate, and Network packages. Enjoy a free trial with no credit card required, no setup fees, and the freedom to cancel anytime. Benefit from features like unlimited affiliates, advanced reporting, customizable interfaces, and lifetime support. Save up to 20% with annual billing and take advantage of more than 220 integrations. Perfect for businesses seeking to enhance their affiliate marketing efforts. Visit now to find the ideal plan for you!