Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

affiliate future tracking script

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-26-2005, 11:21 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default affiliate future tracking script

Having a little trouble with this script for affiliate future regarding the {order.total}

This is the script im using, it seems to take the orderid ok but when i view page source the order.total is completley blank (just shows '')

can anyone see anything wrong with this code

Code:
{literal} <script language="javascript" src="https://scripts.affiliatefuture.com/AFFunctions.js"></script> <script language="javascript"> var merchantID = 965; var orderValue = '{/literal}{$order.total}{literal}'; var orderRef = '{/literal}{$orderids}{literal}'; var payoutCodes = ''; var offlineCode = ''; AFProcessSaleV2(merchantID, orderValue, orderRef,payoutCodes,offlineCode); </script> {/literal}
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #2  
Old 05-27-2005, 08:19 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default

Not sure if this is any use at all but the syntax I use for Ultimate Affiliate for subtotal is:

Code:
{$orders[oi].order.subtotal}

Maybe try:

Code:
{$orders[oi].order.total}


Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #3  
Old 05-27-2005, 10:03 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

yeah x-cart team sorted me with this one
with this which will pass the amount which is total ex shipping and including any discount from coupon codes)

Code:
{section name=oi loop=$orders} {assign var="aff_order" value=$orders[oi].order} {math assign="temp_total" equation="x-y" x=$aff_order.total y=$aff_order.shipping_cost} {literal} <script language="javascript" src="https://scripts.affiliatefuture.com/AFFunctions.js"></script> <script language="javascript"> var merchantID = 965; var orderValue = {/literal}'{$temp_total}'{literal}; var orderRef = {/literal}'{$aff_order.orderid}'{literal}; var payoutCodes = ''; var offlineCode = ''; AFProcessSaleV2(merchantID, orderValue, orderRef,payoutCodes,offlineCode); </script> {/literal}
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #4  
Old 05-30-2005, 01:49 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

Ok so we have finally got our affiliate program in place now, might take a few months to see how many affiliates we can attract so not a lot to report on it at the moment
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #5  
Old 10-19-2005, 01:12 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default

Hi,

You're using Carrie's Reward Points modules for your pants points aren't you? If so, have you got different affiliatefuture tracking code now to subtract the pant points cash value from the order total? I'm guessing you're not paying the affiliate commission on redeemed reward points?

Thanks

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #6  
Old 10-19-2005, 01:36 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

We are currently doing it on the total ex shipping
so the pants points are taken off beforehand and then the comission is paid on the remainder

so for example our tracking script looks like this
Code:
{section name=oi loop=$orders} {assign var="aff_order" value=$orders[oi].order} {math assign="temp_total" equation="x-y" x=$aff_order.total y=$aff_order.shipping_cost} {literal} <script language="javascript" src="https://scripts.affiliatefuture.com/AFFunctions.js"></script> <script language="javascript"> var merchantID = XXX; var orderValue = {/literal}'{$temp_total}'{literal}; var orderRef = {/literal}'{$aff_order.orderid}'{literal}; var payoutCodes = ''; var offlineCode = ''; AFProcessSaleV2(merchantID, orderValue, orderRef,payoutCodes,offlineCode); </script> {/literal} {/section]
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #7  
Old 10-19-2005, 01:49 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default

Thanks for that,

One last thing, which file are are you putting the code in? I've got my old affiliate code in order_invoice.tpl which works fine but I'm mindful that template shows up in other places, not just the confirmation page. customer/main/order_message.tpl seems to be the one I've seen mentioned a few times, but thought I'd better check first!

Thanks again

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #8  
Old 10-19-2005, 04:34 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

Yeah order_message.tpl is the one i've got it in, we've also jsut launched today with affiliate window
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #9  
Old 10-19-2005, 04:55 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default

Thanks....are you still with Affiliate future? We're just about to sign up with them....

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #10  
Old 10-19-2005, 05:07 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

Yes still running with affiliate future as well.
Affiliate Window is more expensive but they have better tools for product feeds etc (in my opinion) so im not sure how this will work out with running with 2 AFF companies and it will be more work in the case of duplicate comissions (i.e if someone comes from a AF link first, doesnt buy but then comes back later through a AW link) but its worth giving it a try and hopefully it should work out. I'll keep you posted
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:11 AM.

   

 
X-Cart forums © 2001-2020