Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

configuration of shareasale


Recommended Posts


I'm trying to figure out what variables I would need to put into this line of code that tracks the orders for shareasale.


I would guess that this code would go into the checkout_success.php file,


This is the code:


<img src="https://shareasale.com/sale.cfm?amount=AMOUNTOFSALE&tracking=TRACKINGNUMBER&transtype=sale&persale=&perlead=&perhit=&merchantID=1111" width=1 height=1>


I need a subtotal total (without tax or shipping) variable that would go into the code above in place of AMOUNTOFSALE and also I need the variable for the order number which would go into TRACKINGNUMBER place.


I know that there is an affiliate program for the cart, but I am using shareasale because after I get it set up I will have affiliates joining immediately, rather than having to round them all up on my own.


If someone has the answer to this I would really really appreciate it.


I have done this many times before, but that was always on a cgi cart. I've started using this system and love it. But I'm not quite up to par on PHP.



Link to comment
Share on other sites

  • 9 months later...

I am having a problem too..I tried the contrib for this and it works but at the SAS site the sales_id is wrong.


// Begin Affiliate Program - Sales Tracking
$orders_total=$currencies->format($cart->show_total()- $total_tax); 
// End Affiliate Program - Sales Tracking


2).Find This Line in catalog/checkout_success.php

<h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td>
Add After it:
// Start Affiliate Program - Sales Tracking

echo '<img src="https://shareasale.com/sale.cfm?amount='.$orders_total.'&tracking='.$orders_id.'&transtype=sale&persale=&perlead=&perhit=&merchantID=0001" width=1 height=1">'; 

// End Affiliate Program - Sales Tracking  


I think it has to do with this line:




I am not sure why the orders_id has to do with the orders_products_id

Well..any help on this?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...