View Single Post
  #5  
Old 12-02-2011, 10:05 AM
Maya's Avatar
Maya Maya is offline
Ecwid Team
 
Join Date: Feb 2010
Location: Ecwid headquarter
Posts: 5,876
Default

Quote:
Originally Posted by Tara West View Post
Hello Maya,

Thank you for your reply and explanation.

I wondered if you could offer me further guidance please. This is the code I have been given in iDevAffiliate:

<script language="JavaScript" type="text/javascript" src="http://affiliate.mydomain.com/affiliate/sale.php?profile=00000&idev_saleamt=XXX&idev_order num=XXX"></script>

And the instructions above it state:

You must alter all =XXX entries with the actual variable name your cart or merchant account uses. Example: =${variable_name} This will look different for all carts and merchant accounts. Check their support forums for proper syntax.


I understand what you said about it currently not tracking order details - so in the code above where it asks for the syntax for saleamt and ordernum, I guess this this is defunct.

But I wondered if I could still add the code provided by iDevAffiliate (even though it won't track order details), and insert the code into the place you mentioned? Even though it isn't a .gif?

Thanks for your help.
Yes, you could add provided by iDevAffiliate code into order confirmation page, but with some restrictions.

Since it is quite difficult to get total order cost and ordered items info on checkout page using javascript (technically it is possible, but require serious code changes), we recommend you to use your affiliate code without it. You need to add following code in the end of your 'Store' page:
Code:
<script type="text/javascript">
Ecwid.OnPageLoaded.add(function(page) {
 if (page.type === 'ORDER_CONFIRMATION') {
    (function() {
     var script;
     script = window.document.createElement('script');
     script.src = "http://affiliate.mydomain.com/affiliate/sale.php?profile=00000";  
            window.document.body.appendChild(script);
    })();
 }
});
</script>
You need to change 'http://affiliate.mydomain.com/affiliate/sale.php?profile=00000' link as needed. I have excluded from this script 'idev_saleamt' and 'idev_order num' parameters, which use for passing order details.

When new 10.2 version will be released, it would be better to remove above code from the page and insert your affiliate code in Ecwid control panel, which will allow you to track order details.

Once you have added this script, your affiliate code will be added to the order confirmation page. It allows you to track the fact of order placing.

Quote:
Originally Posted by Bill Roberts View Post
Maya could you please give an estimate time-frame on the 10.2 release?
New 10.2 version is on the testing stage now and we do our best to finish it as quick as possible. You can test next Ecwid version on our development server right now. Any help with testing will be very appreciated.
__________________
Maya N., Ecwid Team

------------------
Welcome to our new Help Center!