*** This is a DEMO WEBSITE. Your order will NOT be fulfilled ***

Order Confirmation

var dakisId = '<%= cart.id %>'; var dakisSubTotal = '<%= cart.subTotal %>'; var dakisTaxes = '<%= cart.totalTaxes %>'; var dakisTotal = '<%= cart.total %>'; var dakisShipping = '<%= cart.totalShipping %>'; var dakisCurrency = '<%= cart.currency.code %>'; var dakisItems = JSON.parse('<%= JSON.stringify(cart.items) %>'); var items = []; var products = []; for (var i = 0; i < dakisItems.length; i++ ) { items.push({ name: dakisItems[i].text, id: dakisItems[i].id, price: dakisItems[i].price, quantity: dakisItems[i].quantity }) } dataLayer.push({ 'ecommerce': { 'purchase': { 'actionField': { 'id': dakisId, // Transaction ID. Required for purchases and refunds. 'affiliation': 'Online Store', 'revenue': dakisTotal, // Total transaction value (incl. tax and shipping) 'tax':dakisTaxes, 'shipping': dakisShipping, }, items: products } } });
var dakisId = '<%= cart.id %>'; var dakisSubTotal = '<%= cart.subTotal %>'; var dakisTaxes = '<%= cart.totalTaxes %>'; var dakisTotal = '<%= cart.total %>'; var dakisShipping = '<%= cart.totalShipping %>'; var dakisCurrency = '<%= cart.currency.code %>'; var dakisItems = JSON.parse('<%= JSON.stringify(cart.items) %>'); var items = []; for (var i = 0; i < dakisItems.length; i++ ) { items.push({ item_name: dakisItems[i].text, item_id: dakisItems[i].id, price: dakisItems[i].price, quantity: dakisItems[i].quantity }) } dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ event: "purchase", ecommerce: { transaction_id: dakisId, affiliation: "Online Store", value: dakisSubTotal, tax: dakisTaxes, shipping: dakisShipping, currency: dakisCurrency, items: items } });