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

Affiiate program code help

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-31-2007, 03:31 PM
 
stylefly stylefly is offline
 

Member
  
Join Date: Apr 2006
Posts: 25
 

Default Affiiate program code help

We're trying to integrate an affiliate program into our order confirmation page. After doing a little research I figure we need to add it to the order_message.tpl The code is for a tracking pixel. I'm not sure how to get the variables they require to match up to the ones in order_message.tpl

Here is the sample php code they provided:

<img src="https://www.shareresults.com/t/sale.php?mid=xxxx&clid=<?=$_REQUEST["customerID"];?>&orderid=
<?=$REQUEST["orderID"];>&revamnt=<?=$_REQUEST["netamnt"];?>&purchamnt=<?=$REQUEST["grossamount"];?>" border=0 width=0 height=0>

Where the required variables are:

mid: your SR assigned merchant ID.
clid: your unique customer ID, identifying each customer account.
orderid: your unique order ID, identifying each order/purchase.
revamnt: net sale amount, not including shipping, taxes, or any other charges.
purchamnt: gross sale amount. It's the total purchase amount including any other charges.

How should I alter the above sample so that it play's nicely with Xcart?

Thanks In advance!
__________________
X-Cart Version 4.4.4
Reply With Quote
  #2  
Old 08-03-2007, 12:20 PM
 
stylefly stylefly is offline
 

Member
  
Join Date: Apr 2006
Posts: 25
 

Default Re: Affiiate program code help

I'm not sure but I think I have it. We have to test this with the affiliate program provider but i just changed the code to this:

<img src="http://www.shareresults.com/t/sale.php?mid=8907&clid={$order.login}&orderid=
{$order.orderid}&revamnt={$order.subtotal}&purcham nt={order.subtotal}" border=0 width=0 height=0>

If anyone knows can see an error there, please let me know so I can figure it out before I have to go back to the provider. I'll update if I get anything back from them.
__________________
X-Cart Version 4.4.4
Reply With Quote
  #3  
Old 05-29-2008, 11:44 AM
 
chiactivate chiactivate is offline
 

Senior Member
  
Join Date: Feb 2007
Location: Canada
Posts: 148
 

Unhappy how to put Affiiate program tracking code

I have the same issue. I need to put the tracking code in X-cart.
I am using Pay Pal.

I assume the code should be in skin1/main/customer/order_message.tpl

This is the code and the instructions:

<iframe src="https://www.rewardtrak.com/pub/c/index.cfm?m=35&c=33&v=[value_of_sale]&t=[label]" style="visibility: collapse; width:1px; height:1px;"></iframe>


Replace the value of the sale. Replace [value_of_sale] with an expression equal to the amount of the sale. See the following for examples in common web application platforms, or consult your web application platform's documentation on how to do this.
PHP

In PHP, you might have a variable named $amount that contains the amount of the sale. In that case, you would replace [value_of_sale] above with the value of $amount.




Replace the value of the label. The label contains any data that you may wish to use to identify the transaction for your own purposes, so that you can match RewardTrak's conversion reports with your own transaction data. Replace [label] with such an identifier. See the following for examples in common web application platforms, or consult your web application platform's documentation on how to do this.



PHP

Suppose you had a variable $transaction_id that contained the ID of the completed purchase. In that case, you would replace [label] with the value of $transaction_id.


MY QUESTION: Which value should I put in [value_of_sale] and [label]

Where is the transaction ID and amount of sale?

Should it coming from Pay Pal?

Any help is appreciated! Thanks
__________________
www.ChiMassager.com
X-cart Version 4.44

www.SEOMarketing30days.com
--> Download FREE SEO marketing Ebook (valued $50)
Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic!
Reply With Quote
  #4  
Old 05-29-2008, 11:46 AM
 
chiactivate chiactivate is offline
 

Senior Member
  
Join Date: Feb 2007
Location: Canada
Posts: 148
 

Default Re: Affiiate program code help

By the way, stylefly.

Which payment method are you using?
__________________
www.ChiMassager.com
X-cart Version 4.44

www.SEOMarketing30days.com
--> Download FREE SEO marketing Ebook (valued $50)
Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic!
Reply With Quote
  #5  
Old 05-29-2008, 12:26 PM
 
chiactivate chiactivate is offline
 

Senior Member
  
Join Date: Feb 2007
Location: Canada
Posts: 148
 

Default Re: Affiiate program code help

Found this in the old posting:


http://forum.x-cart.com/showthread.php?t=36191&highlight=affiliate+code


WHERE:
----------
transaction id => {$order.orderid} ---> Got info from oder_invoice.tpl

total amount paid=[total] => {include file="currency.tpl" value=$order.total} ---> Got info from oder_data.tpl

products sold=[productList] => {include file="modules/Product_Options/display_options.tpl" options=$product.product_options options_txt=$product.product_options_txt force_product_options_txt=$product.force_product_o ptions_txt} ---> Got info from oder_data.tpl


Is this correct? Anyone who can confirm this?
__________________
www.ChiMassager.com
X-cart Version 4.44

www.SEOMarketing30days.com
--> Download FREE SEO marketing Ebook (valued $50)
Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic!
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 03:21 PM.

   

 
X-Cart forums © 2001-2020