X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Affiiate program code help (https://forum.x-cart.com/showthread.php?t=32936)

stylefly 07-31-2007 03:31 PM

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!

stylefly 08-03-2007 12:20 PM

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.

chiactivate 05-29-2008 11:44 AM

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

chiactivate 05-29-2008 11:46 AM

Re: Affiiate program code help
 
By the way, stylefly.

Which payment method are you using?

chiactivate 05-29-2008 12:26 PM

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?


All times are GMT -8. The time now is 03:29 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.