Jump to content

Tracking code on order-confirmation.tpl


Recommended Posts

Hello,

I need to insert a array javascript in order-confirmation.tpl that have how variable the list of products in the order completed.

 

The array is:
 

var products = {
    "ID_product",
    "amount",
    "quantity"

}

 

Can anyone give me some idea?

 

Thanks :)

Link to comment
Share on other sites

i know how to use smarty code, but i don't know how to implement it in tracking code. there is only simple code:

var products = {
    "ID_product",
    "amount",
    "quantity"
}

as you can see it's an example of pattern for only one product.

what if cart will contain more products?

Link to comment
Share on other sites

  • 2 weeks later...

I also need to put this code in order-confirmation.

To give you an idea, I had to put one like in shopping-cart.tpl and was as follows:

{literal}
        	<script type="text/javascript">
				var aux = {
				"productBrand": "{/literal}{Manufacturer::getNameById((int)$product.id_manufacturer)}{literal}",
				 "orderProducts": [
						{"id": "{/literal}{$product.id_product}{literal}", "price": "{/literal}{$product.price_wt}{literal}", "qty": "{/literal}{$product.cart_quantity}{literal}"}       
					]
				};
			</script>
            {/literal}
Edited by jarega88 (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...