Welcome, Guest. Please login or register.
Login with username, password and session length


Need help or want to talk to other developers? Join the VirtueMart Chat! Read more...

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
Pages: [1]   Go Down
Print
Author Topic: Virture Mart and affiliate software  (Read 9953 times)
vida
Newbie
*
Posts: 1


« on: January 27, 2006, 17:57:56 PM »

Hi

I would like to use VM and Post Affiliate Pro, http://www.qualityunit.com/postaffiliatepro/ but I need to be able to set individual commission rates for items in the cart.

Post Affiliate Pro have asked me to find the answer to this question to find out whether VM is compatable to do this.

*******************************************************************************************

The sale in Post Affiliate Pro is registered by this code:

<img src="http://www.yourdomain.com/affiliate/scripts/sale.php?TotalCost=
XXXXXX&OrderID=XXXXXX&ProductID=XXXXXX"
width=1 height=1>

Where all XX's should be replaced for
TotalCost=  total cost of the product (cost for all items, if customer will buy multiple)
OrderID=    ID of order in your shopping cart
ProductID=  ID of product for which we are registering sale at the moment.

This code should be added in program loop which is responsible for generating final Order receipt, so all products can be registered with our PAP software with this code.

Is it possible in your shopping cart to add this feature?

*******************************************************************************************

Does any one know?  Or do you know of another affiliate software programme that is maybe more suitable?

Thanks
Logged
Flat_Eric
Newbie
*
Posts: 6


« Reply #1 on: May 02, 2006, 16:53:23 PM »

Add the following code to: checkout.thankyou.php, just before the final ?>:


//--------------------------------------------------------------------------
// POST Affiliate Pro code === EC ON 2ND MAY 2006 ===
// The code below will get the order_id and total value of recent order
// from the database and displays invisible image that registers the sale
// for affiliate (if some affiliate referred this visitor)
//--------------------------------------------------------------------------

$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' );

$img = '<img src="http://YOURDOMAIN.CCOM/affiliate/'.
   'scripts/sale.php?TotalCost='.$pap_order_total.'&OrderID='.$order_id.'&ProductID='
   .$pap_product_id.'" width=1 height=1>';
print $img;
echo $img;

 //--------------------------------------------------------------------------
 // POST Affiliate Pro code === END OF CUSTOMISATION ===
 //--------------------------------------------------------------------------

I am in no way a developer but needed the integration, and tthe one I've just written seems to work.

FE
« Last Edit: May 02, 2006, 17:00:50 PM by Flat_Eric » Logged
Flat_Eric
Newbie
*
Posts: 6


« Reply #2 on: May 06, 2006, 04:08:44 AM »

Update on the above:


//--------------------------------------------------------------------------
// POST Affiliate Pro code === EC ON 2ND MAY 2006 ===
// The code below will get the order_id and total value of recent order
// from the database and displays invisible image that registers the sale
// for affiliate (if some affiliate referred this visitor)
//--------------------------------------------------------------------------

$q  = "SELECT * FROM #__{vm}_orders WHERE order_id='$order_id'";
$db->query( $q );
$pap_order_total = $db->f( 'order_subtotal' ) - $db->f( 'coupon_discount' );
 
$q  = "SELECT * FROM #__{vm}_order_item WHERE order_id='$order_id'";
$db->query( $q );
$pap_product_id = $db->f( 'product_id' );

$img = '<img src="http://YOURDOMAIN.COM/affiliate/'.
   'scripts/sale.php?TotalCost='.$pap_order_total.'&OrderID='.$order_id.'&ProductID='
   .$pap_product_id.'" width=1 height=1>';
print $img;
echo $img;

 //--------------------------------------------------------------------------
 // POST Affiliate Pro code === END OF CUSTOMISATION ===
 //--------------------------------------------------------------------------

This one has a difference in the calculation:
- In the first post, the commission would eb calculated on the order subtotal
- In the second version, it is based on order subtotal - coupon discount

If you are combining couponing and affiliatiion, this is a more logical way to reward affiliates, as you're paying them on the value of what they've acutally sold (ie without additional discounts they may have granted).

FE
« Last Edit: May 06, 2006, 04:18:30 AM by Flat_Eric » Logged
coalesce
Newbie
*
Posts: 28



WWW
« Reply #3 on: June 30, 2006, 19:09:27 PM »

Did this program work out for you? I'm looking to add affiliate capabilities to our site as well..

Thanks!
Logged

Benn0
Newbie
*
Posts: 3


« Reply #4 on: August 10, 2006, 10:44:35 AM »

This skript doesn´t work at my system Sad
Just the Cost per Click works perfekt...

Logged
coalesce
Newbie
*
Posts: 28



WWW
« Reply #5 on: August 10, 2006, 11:07:19 AM »

They just updated their software... I'm going to see if it finally works... It's been hell with these people....
Logged

Benn0
Newbie
*
Posts: 3


« Reply #6 on: August 11, 2006, 07:41:17 AM »

Hi again!
Yesterday and today i do many tests...
It seems to work but there is one big problem...
The parameter in the thankyou page is:

<img src="http://www.inwhite.de/affiliates/scripts/sale.php?TotalCost=68.96551&amp;OrderID=63&amp;ProductID=96"

The Problem: the "&" changed into "&amp;"
I think thats the problem why this doesn´t work...
Can you help me with this problem?
Logged
coalesce
Newbie
*
Posts: 28



WWW
« Reply #7 on: August 11, 2006, 10:02:13 AM »

Benn0, did you e-mail Post Affiliate Pro tech support? Make sure you have the latest verison, I had to completely re-install my version with the new one to get it working with VM
Logged

unitminer
Newbie
*
Posts: 4


« Reply #8 on: April 06, 2009, 07:59:22 AM »

Hello, I'm owner of Quality Unit (development company, which develop Post Affiliate Pro).

If you have any problems with integration, just contact our support team, they will try to help you with your problem. For sure there will be solution for every type of integration.
Logged
Globacide Solutions
Newbie
*
Posts: 46


Globacide Solutions


WWW
« Reply #9 on: December 13, 2009, 04:41:32 AM »

Or you can try something pre-integrated into VM like it's always been there:
VM Affiliate.
Logged

Emilian Manolache
Globacide Solutions
VirtueMart Affiliate
Carty
Newbie
*
Posts: 9


« Reply #10 on: December 15, 2009, 00:08:28 AM »

I recently switched over to Amigos affiliate system (completely free) and works with Virtuemart after little modifications.

Works best for my store at www.WinMoAppStore.com
Logged
dinojavante
Newbie
*
Posts: 5

Myself


« Reply #11 on: December 23, 2009, 00:23:08 AM »

care to give more details about the commission part?
Logged

Pages: [1]   Go Up
Print
Jump to: