Farrukh Posted May 17, 2003 Share Posted May 17, 2003 HIya all I have joined Shareasale and Darkblue recently and i was looking for a way to include the Affiliate Tracking Code into the Confirmation page. So i created a small contirbution for this very purpose. You can check the contribution here: http://www.oscommerce.com/community/contributions,1249 Got most of the help from Henri Schmidhuber Quote Link to comment Share on other sites More sharing options...
SamyT Posted April 2, 2004 Share Posted April 2, 2004 I am having a huge problem with shareasale - one, it's taking the 10% for commission and it's taking 10% of the shipping costs too. It should take 10% from the subtotal, not the full total. Also, it won't track pay pal - I'm not a technical person and have no idea how to fix this but it's driving me mental!! Quote Link to comment Share on other sites More sharing options...
pfaustino Posted May 13, 2004 Share Posted May 13, 2004 I was able to install this contrib and the sub-total seems to work but the order_id is wrong. In my case it was supposed to be 55 but the tracking is 112. I figured out the fix. Just change the contrib code from $orders_id=$order_products_id; to $orders_id=$insert_id; Thanks for the contrib! Quote Link to comment Share on other sites More sharing options...
bluecivic21 Posted June 19, 2004 Share Posted June 19, 2004 anyone got this to work with ms2? if so can you provide the changes ( code) Quote Link to comment Share on other sites More sharing options...
pfaustino Posted June 19, 2004 Share Posted June 19, 2004 I am having a huge problem with shareasale - one, it's taking the 10% for commission and it's taking 10% of the shipping costs too. It should take 10% from the subtotal, not the full total. Also, it won't track pay pal - I'm not a technical person and have no idea how to fix this but it's driving me mental!! When you insert the shareasale pixel, you need to pass over the sub-total. Do not pass the Grand Total or it will take 10% of the grand total. That includes shipping and taxes. Quote Link to comment Share on other sites More sharing options...
pfaustino Posted June 19, 2004 Share Posted June 19, 2004 HIya all I have joined Shareasale and Darkblue recently and i was looking for a way to include the Affiliate Tracking Code into the Confirmation page. So i created a small contirbution for this very purpose. You can check the contribution here: http://www.oscommerce.com/community/contributions,1249 Got most of the help from Henri Schmidhuber I'm having a problem with dual affiliate systems: If a visitor has come from a Shareasale affiliate then bought something, Shareasale gets credit. Then if the same visitor comes from DarkBlue later on, BOTH Darkblue and Shareasale gets credit. That's because you have both pixels showing. I need to figure out how to prevent the original pixel from showing once the same visitor comes back from the other affiliates. Basically change the code to: If the referrer is shareasale, only show the shareasale pixel If the referrer is Darkblue, only show the darkblue pixel. Quote Link to comment Share on other sites More sharing options...
Farrukh Posted October 16, 2004 Author Share Posted October 16, 2004 (edited) Try this code 1).Find This Line in catalog/checkout_process.php // load the after_process function from the payment modules $payment_modules->after_process(); $cart->reset(true); Add Above it: // Begin Affiliate Program - Sales Tracking $orders_total=$currencies->format($order->info['subtotal']); tep_session_register('orders_total'); $orders_id=$insert_id; tep_session_register('orders_id'); // End Affiliate Program - Sales Tracking 2).Find This Line in catalog/checkout_success.php <h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td> </tr> </table></td> </tr> Add After it: // Start Affiliate Program - Sales Tracking <?php // Start Affiliate echo '<a src="https://shareasale.com/sale.cfm?amount=' . $currencies->format($order->info['subtotal']) .'&tracking='.$orders_id.'&transtype=sale&persale=&perlead=&perhit=&merchantID=3735" width=1 height=1">'; tep_session_unregister('orders_total'); tep_session_unregister('orders_id'); // End Affiliate ?> // End Affiliate Program - Sales Tracking Reply to the thread if the above solution works. its for Sub Totaal Edited October 16, 2004 by Farrukh Quote Link to comment Share on other sites More sharing options...
Farrukh Posted October 16, 2004 Author Share Posted October 16, 2004 I am not using Dark Blue at the moment so i wont be able to help Sorry Quote Link to comment Share on other sites More sharing options...
cking4416 Posted January 22, 2005 Share Posted January 22, 2005 I am trying to get this contribution to work on MS2 for darkblue. But it is not working. Anyone have directions on how to get MS2 to work with darkblue? Quote Link to comment Share on other sites More sharing options...
Fourbit Posted January 28, 2005 Share Posted January 28, 2005 I am trying to get this contribution to work on MS2 for darkblue. But it is not working. Anyone have directions on how to get MS2 to work with darkblue? <{POST_SNAPBACK}> I used the code that was added back in Oct 16 by Farrukh. But, it didn't want to work. I modified the code in the catalog/checkout_success.php file to this and things are working. But, you must of course change <your_id_number_here> . <?php /* Start Affiliate Program - Sales Tracking $merchantID = '<your_id_number_here>'; <img src="https://shareasale.com/sale.cfm?amount=AMOUNTOFSALE&tracking=TRACKINGNUMBER&transtype=TYPEOFTRANSACTION&merchantID=6805" width="1" height="1"> */ echo '<img src="https://shareasale.com/sale.cfm?amount=' . strip_tags($order_total['value']) .'&tracking=' . $orders_id . '&transtype=sale&merchantID='. $merchantID .'" width=1 height=1">'; tep_session_unregister('orders_total'); tep_session_unregister('orders_id'); // End Affiliate Program - Sales Tracking ?> Paul Quote Link to comment Share on other sites More sharing options...
SamyT Posted January 28, 2005 Share Posted January 28, 2005 Does that work when Pay Pal is your payment method? Quote Link to comment Share on other sites More sharing options...
Fourbit Posted January 28, 2005 Share Posted January 28, 2005 Oops. I got a bit messed up on my last post sorry. I think this is a bit better. And I do think that this will work with PayPal. But, I have yet to test that. I have just tested it with check/moneyorder . I used the code that was added back in Oct 16 by Farrukh. But, it didn't want to work. I modified the code in the catalog/checkout_success.php file to this and things are working. But, you must of course change <your_id_number_here> . <?php // Start Affiliate Program - Sales Tracking $merchantID = '<your_id_number_here>'; echo '<img src="https://shareasale.com/sale.cfm?amount=' . strip_tags($order_total['value']) .'&tracking=' . $orders_id . '&transtype=sale&merchantID='. $merchantID .'" width=1 height=1">'; tep_session_unregister('orders_total'); tep_session_unregister('orders_id'); // End Affiliate Program - Sales Tracking ?> Paul Quote Link to comment Share on other sites More sharing options...
Guest Posted April 6, 2005 Share Posted April 6, 2005 I've been unable to get ShareaSale to work along with the Paypal IPN payment module. This is partly because the user is taken off-site to process cards and then returned so the values are not passed to the sharasale source placed in checkout_success.php. So, to work around this I am trying to add the shareasale code to the checkout_process.php page, but I noticed that it doesn't have any HTML that gets displayed so the pixel from shareasale never gets called. Where can I add this code to complete the sharasale tracking? // Start Affiliate Program - Sales Tracking <php echo '<img src="https://shareasale.com/sale.cfm?amount='.$orders_total.'&tracking='.$orders_id.'&transtype=sale&persale=&perlead=&perhit=&merchantID=myID" width=1 height=1">'; tep_session_unregister('orders_total'); tep_session_unregister('orders_id'); ?> // End Affiliate Program - Sales Tracking TIA Quote Link to comment Share on other sites More sharing options...
SamyT Posted April 6, 2005 Share Posted April 6, 2005 Every man and his dog has tried to get SAS working with Pay Pal, there isn't a single merchant it tracks the actual amount with, it has to be added in manually in SAS. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 8, 2005 Share Posted April 8, 2005 I can tell you that my dog hasn't worked on this yet. :D I've been trying to figure out if there was a way to do this through cookies. Set the cookie then retrieve it before shareasale transaction completes. Whatdya think? Quote Link to comment Share on other sites More sharing options...
dijimon Posted June 9, 2005 Share Posted June 9, 2005 I've implemented sales tracking with PayPal and I've just added this as a new contribution (not showing yet). If anyone wants the code before the contribution is available just PM me. It's a very simple mod to checkout_success.php only. Quote Link to comment Share on other sites More sharing options...
axell Posted August 31, 2005 Share Posted August 31, 2005 Hi folks, I have signed up with shareasale.com affiliate program, but was unable to implement the tracking code with MS2. I have written shareasale.com for my problem and what they advised me was to place this code into checkout_process.php: // Begin Affiliate Program - Sales Tracking $orders_total=$currencies->format($cart->show_total()- $total_tax); tep_session_register('orders_total'); $orders_id=$insert_id; tep_session_register('orders_id'); // End Affiliate Program - Sales Tracking In the page: catalog/checkout_success.php, just below the line, <h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td> add the following code: <!-- Start Affiliate Program - Sales Tracking --> <?php echo '<img src="https://shareasale.com/sale.cfm?amount='.$orders_total.'&tracking='.$or ders_id.'&transtype=sale&merchantID=XXXX" width="1" height="1">'; tep_session_unregister('orders_total'); tep_session_unregister('orders_id'); ?> <!-- // End Affiliate Program - Sales Tracking --> Where you replace XXXX with your merchant ID number. However it didn?t work. I would like to know if anyone has implemented the code in order to work with osCommerce MS2 and 2checkout V2. I don?t know if there is a difference whether it is 2checkout, Paypal or any other payment processor, but I guess that it matters since the parameters 2checkout returns after a sale is generated are different from those with Paypal for example. Anyone?!? :huh: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.