ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Need help adding code to ordercomplete.asp
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Need help adding code to ordercomplete.asp

 Post Reply Post Reply
Author
Message
TrekLightGear View Drop Down
Newbie
Newbie


Joined: 24-April-2007
Location: Boulder, CO
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote TrekLightGear Quote  Post ReplyReply Direct Link To This Post Topic: Need help adding code to ordercomplete.asp
    Posted: 29-January-2009 at 7:13pm
Hey everyone -

Instead of using the built-in affiliate feature in PC I partnered up with AvantLink to host my affiliate program.   In order to integrate it, I got the following instructions:

Add the following line of JavaScript to your order confirmation page:
<script type="text/javascript" src="https://tracking.avantlink.com/avant_rfpc.php?mi=[MERCHANT_ID]&ot=[ORDERTOTAL]&on=[ORDERNUMBER]&oi=[ORDERITEMS]"></script>

Replace:

[MERCHANT_ID] with the provided Merchant ID for your affiliate program

[ORDERTOTAL] with a variable that outputs the order total (without taxes, shipping)

[ORDERNUMBER] with a variable that outputs the order number so that we can match affiliate sales back to your internal order numbers.

[ORDERITEMS] Replace this with a delimited list of items that were part of the order.

Each order item needs to contain the SKU, Item Price (for a single item) and quantity and be delimited by the pipe (|) character:

SKU|Price|Quantity

For orders that contain multiple items, each item should be delimited with the tilde (~) character. Example with multiple items:

SKU1|Price1|Quantity1~SKU2|Price2|Quantity2

Here's a full example of what the javascript would look like for an order with 2 items:

<script type="text/javascript" src="https://tracking.avantlink.com/avant_rfpc.php?mi=11111&ot=48.99&on=1234&oi=TNF0123|19.99|1~TNF4567|29.00|1"></script>

Note: The SKUs passed to us in the tracking need to match the SKUs in the product datafeed you provide to us so that we can properly report on the sale item details.


If anyone could help me figure out what the correct variables are that I need to include in the code to meet the requirements I would greatly appreciate it.  I tried searching the Wiki as well as the Forum but couldn't find the right info to help me figure this out.

Seth Haber
Back to Top
ProductCart View Drop Down
Admin Group
Admin Group

ProductCart Team

Joined: 01-October-2003
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote ProductCart Quote  Post ReplyReply Direct Link To This Post Posted: 30-January-2009 at 10:13am
The ProductCart Team

Home of ProductCart shopping cart software
Back to Top
TrekLightGear View Drop Down
Newbie
Newbie


Joined: 24-April-2007
Location: Boulder, CO
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote TrekLightGear Quote  Post ReplyReply Direct Link To This Post Posted: 30-January-2009 at 11:24am
Sorry, I should have mentioned that I did find the variables for the OrderId, OrderTotal, but I didn't see anything in the wiki or the comment in ordercomplete.asp in regards to passing the order items as required.   Is that something you can help me out with?

Also, EarlyImp, I would love it if you could let me know about the ability to pass the OrderTotal (pTotal) without Tax and Shipping included.   This is a huge problem for those of us using any kind of third party affiliate program, if I send the pTotal amount I'm paying my affiliates a commission on tax and shipping which is clearly money lost on my end.  I first posed the question in this thread but never got anywhere:  http://www.earlyimpact.com/forum/forum_posts.asp?TID=2252&KW=&PID=7846

Thanks!
Seth Haber
Back to Top
ProductCart View Drop Down
Admin Group
Admin Group

ProductCart Team

Joined: 01-October-2003
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote ProductCart Quote  Post ReplyReply Direct Link To This Post Posted: 02-February-2009 at 11:51am
If you look at our integration with Google Analytics, you will see that we build item-level data into a string formatted according to the GA specifications in the file "pc/inc-GoogleAnalytics.asp".

This is used for the e-commerce integration with Google Analytics.

The code included in that file should definitely help you accomplish what you described above.
The ProductCart Team

Home of ProductCart shopping cart software
Back to Top
TrekLightGear View Drop Down
Newbie
Newbie


Joined: 24-April-2007
Location: Boulder, CO
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote TrekLightGear Quote  Post ReplyReply Direct Link To This Post Posted: 02-February-2009 at 6:59pm
Thanks for the tip about the Analytics page, I think that's definitely what I was looking for.  Unfortunately I'm a bit of an amateur when it comes to coding, so forgive me for still needing help to figure this out.

Here's a couple more questions:  

1.) In order to use the variables defined in inc-GoogleAnalytics.asp can I just add the line <!--#include file="inc-GoogleAnalytics.asp"--> to ordercomplete.asp?

2.) In order to calculate the order amount minus tax and shipping, would I have to define a new variable (say pPreTotal) and then have a line that reads: pPreTotal = pTotal - (pTaxAmount + pTotalShipping)   ?  Am I even close?  :)

3.) In inc-GoogleAnalytics.asp it appears that it passes the item information (SKU, price quantity) for each item in the order on a new line. How do I get it to combine the info for all the items in the order into the one line of code as required?

My apologies again for asking for so much help, but that's what I love about EI and these forums so thank you in advance for any assistance!

Seth Haber
Back to Top
ProductCart View Drop Down
Admin Group
Admin Group

ProductCart Team

Joined: 01-October-2003
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote ProductCart Quote  Post ReplyReply Direct Link To This Post Posted: 03-February-2009 at 5:04am
Seth, that is unfortunately where we have to draw the line. We cannot help the vast ProductCart community implement source code changes. This would be a never-ending effort that is simply not economically sustainable for Early Impact.

What we are happy to do is to provide guidelines, as we did above. If you need assistance implementing these guidelines, however, you will need to contact a developer either through these forums, by using the list of Certified ProductCart Developers available on our Web site, or just by contacting any proficient ASP developer.
The ProductCart Team

Home of ProductCart shopping cart software
Back to Top
TrekLightGear View Drop Down
Newbie
Newbie


Joined: 24-April-2007
Location: Boulder, CO
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote TrekLightGear Quote  Post ReplyReply Direct Link To This Post Posted: 03-February-2009 at 12:52pm
Sorry EarlyImp, I wasn't implying that my questions were directed back to you by any means.  I fully understand that you've done as much as you can in terms of product support.

As you pointed out, the means to implement this are already in place, it just requires another line or two of code to pass the right variables to the AvantLink api.  If this were a complicated integration project I'd certainly enlist the services of a developer, but I really just need some very basic help.  I've seen similar coding help provided plenty of times on this forum so I'm sure there's someone out there who can provide some assistance.

I appreciate all the help you gave and you definitely got me extremely close to solving the problem!
Seth Haber
Back to Top
TrekLightGear View Drop Down
Newbie
Newbie


Joined: 24-April-2007
Location: Boulder, CO
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote TrekLightGear Quote  Post ReplyReply Direct Link To This Post Posted: 05-February-2009 at 9:27am
Bueller?  Anyone?
Seth Haber
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.