...
Code Block |
---|
language | javascript |
---|
theme | DJango |
---|
|
#foreach ($item in $order.getItemSgetItems())
_ltk.Order.AddItem('${$itemitem.getItemId()}', ${$itemitem.getQuantity()}, '${$itemitem.getCost()}');
#end
|
And here is the velocity code inside the larger snippet of javascript:
Code Block |
---|
language | javascript |
---|
theme | DJango |
---|
|
<!-- Listrak Conversion Tracking -->
<script type="text/javascript">
_ltk.Order.SetCustomer('[Email]', '[BillingFirstName]', '[BillingLastName]');
_ltk.Order.OrderNumber = '[OrderId]';
_ltk.Order.ItemTotal = '[Subtotal]';
_ltk.Order.ShippingTotal = '[Shipping]';
_ltk.Order.TaxTotal = '[Tax]';
_ltk.Order.HandlingTotal = '0.00';
_ltk.Order.OrderTotal = '[Total]';
#foreach ($item in $order.getItemSgetItems())
_ltk.Order.AddItem('${$itemitem.getItemId()}', ${$itemitem.getQuantity()}, '${$itemitem.getCost()}');
#end
_ltk.Order.Submit();
</script>
<!-- Listrak Conversion Tracking -->
|