Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejavascript
themeDJango
#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
languagejavascript
themeDJango
<!-- 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 -->