View Single Post
  #1  
Old 06-16-2008, 09:18 AM
  BunnyburyBaby's Avatar 
BunnyburyBaby BunnyburyBaby is offline
 

Advanced Member
  
Join Date: Nov 2007
Location: Los Angeles
Posts: 32
 

Default Commision Junction Pixel Integration....

Hi folks,

I am trying to install a tracking pixel from CJ to track products and totals. Here is my code:

In order_message.tpl:


{foreach from=$orders item="order"}
<img src="https://www.bunnyburybaby.com/u?CID=2412429&OID={$order.order.orderid}&TYPE=5000 {foreach from=$order.products item=product}&ITEM{counter start=1 name=item}={$product.productcode}&AMT{counter start=1 name=amt}={$product.price}&QTY{counter start=1 name=qty}={$product.amount}{/foreach}&CURRENCY=USD&METHOD=IMG" height="1" width="20">{/foreach}

which outputs:

<img src="https://www.bunnyburybaby.com/u?CID=2412429&OID=11561&TYPE=5000&ITEM1=CL-LC-GREEN&AMT1=39.95&QTY1=1&ITEM1=HS-INDIE&AMT1=35.27&QTY1=1&ITEM1=BO-601&AMT1=14.95&QTY1=1&ITEM1=GIFTWRAP&AMT1=7.50&QTY 1=1&CURRENCY=USD&METHOD=IMG" height="1" width="20">

The problem I have is with the counting of the item, qty and amt fields. I tried the {counter} command, but it didnt work. I would like them to start at 1 and go up with each product but my coding is not the best. I would like it to output like this example:

<img src="https://www.bunnyburybaby.com/u?CID=2412429&OID=11561&TYPE=5000&ITEM1=CL-LC-GREEN&AMT1=39.95&QTY1=1&ITEM2=HS-INDIE&AMT2=35.27&QTY2=1&ITEM3=BO-601&AMT3=14.95&QTY3=1&ITEM4=GIFTWRAP&AMT4=7.50&QTY 4=1&CURRENCY=USD&METHOD=IMG" height="1" width="20">

Could you please help me with this. The counting is the only thing holding me up.

Thanks a bunch guys!
Bunnyburybaby
__________________
X-Cart Version 4.1.8
Reply With Quote