Post Affiliate Pro, Virtuemart and Paypal

Post Affiliate Pro and Paypal integration in VirtueMart. This information is very useful if you already have VirtueMart working in your Joomla site. I may say you have to configure Paypal to return after a purchase. To do this:

Login to your Paypal account –> Profile –> Website Payment Preferences
Turn on Auto Return

and

Return URL: http://www.yoursite.com

In VirtueMart I found an issue, Paypal does not allow your country of residence to ship so:

Login in your admin and goto Component–> Virtuemart–> Store–>List of Payment Methods–>Paypal –>Configuration

Look for :
“address_override” => “1?

change to:
“address_override” => “0?

Finally

edit checkout.result.php

This files is located at ” ../administrator/components/com_virtuemart/html/ “. This file will be executed and change the order status to “Confirmed” when the customers are linked back to your website after successful payment.
#vi checkout.result.php

At around line 37, you should see the following line:

<h2><?php echo $VM_LANG->_PHPSHOP_PAYPAL_THANKYOU ?></h2>

Then, after the line above, place the following code:

<!– VirtueMart PAP Commission Tracking Code – START –>
<?php  //track anyway as paypal is must be configured to return automatically to your website
$q = “SELECT * FROM #__{vm}_orders WHERE order_id=’$order_id’”;
$db->query( $q );
$pap_order_total = $db->f(‘order_subtotal’ );
$q = “SELECT * FROM #__{vm}_order_item WHERE order_id=’$order_id’”;
$db->query( $q );
$pap_product_id = $db->f(‘product_id’);
?>
<script id=”pap_x2s6df8d” src=”http://www.yoursite.com/affiliate/scripts/salejs.php” type=”text/javascript”>
</script>
<script type=”text/javascript”>
var sale = PostAffTracker.createSale();
sale.setTotalCost(‘<?php echo $pap_order_total ?>’);
sale.setOrderID(‘<?php echo $order_id ?>’);
sale.setProductID(‘<?php echo $pap_product_id ?>’);
PostAffTracker.register();
</script>
<!– VirtueMart PAP Commission Tracking Code – END –>

Tags: , , ,

11 comments

  1. Thanks for sharing!

  2. Thanks for sharing!

  3. Maybe some error in the listing

  4. what do you mean by error in the listing?

  5. I can’t subscribe to your RSS feed. Can you aid?

  6. Can anyone suggest a very good seo book?”.”

  7. I recommend the SEOBOOK and The Art of SEO my dear friend Hamlet Batista contributed making it. So you are in your way with these to resources.

    Regards

    Benton

  8. i only get and download free seobooks out there on the interenet**.

  9. what is the best SEO Book for beginner anyway ? i downloaded some free SEO Books online:.’

  10. i love to read SEO Books and SEO websites on the internet, there are even good SEO Books that are completely free”~-

  11. you do not need to buy very expensive SEO books because there are some very good free seo books on the net too ~`*

Leave a comment

You must be logged in to post a comment.


Powered by Dailymotion

Stop SOPA