I am trying to integrate the code below on Success page via either a block or by , but after placing an order, the page will be displayed without CSS and the tracking code is not receiving data.
<?php //------------------------------------------- // START TAG TRACKING CODE //------------------------------------------- $ customerId = Mage::getSingleton('customer/session')->getCustomerId(); $ lastOrderId = Mage::getSingleton(‘checkout/session’)->getLastOrderId(); $ order = Mage::getSingleton('sales/order'); $ order->load($ lastOrderId); $ orderData = $ order->getData(); $ orderAmount = $ order->getSubtotal(); $ items = $ order->getAllItems(); $ currency = $ order->getOrderCurrency()->getCode(); $ items_string = ""; foreach ($ items as $ item) { //loop through all the items //get item category code, quantity & amount in 3 variables and append in thee below string $ items_string += "&CAT=" + $ itemCategoryCode + "," + $ itemQty + "," + $ itemAmount; } ?>
Could someone please help?
Thanks in advance!