Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // components/com_virtuemart/themes/default/templates/pages/checkout.thankyou.tpl.php
- // after line 24
- $order_id = $db->record[0]->order_id;
- $order_items = new ps_DB;
- $q = "SELECT * FROM `#__{vm}_order_item` WHERE `order_id`='$order_id'";
- $order_items->query($q);
- $GLOBALS['GA_ECOMM_ITEMS'] = array();
- foreach ($order_items->record as $item) {
- $GLOBALS['GA_ECOMM_ITEMS'][] = array(
- 'sku' => $item->order_item_sku,
- 'name' => htmlspecialchars($item->order_item_name),
- 'category' => '',
- 'price' => $item->product_final_price,
- 'quantity' => $item->product_quantity,
- );
- }
- $GLOBALS['GA_ECOMM_TRANS'] = array(
- 'id' => $order_id,
- 'affiliation' => '',
- 'revenue' => $db->record[0]->order_total,
- 'shipping' => $db->record[0]->order_shipping,
- 'tax' => $db->record[0]->order_tax
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement