I did some looking around and have found and examined the $orders object at the checkout success page. What I am doing is including a tracking pixel into the checkout success page so that the pixel will send a bit of information to an external program I wish to use. The pixel will report the amount of the sale and the sale ID to the external system. I used the Define Pages Editor and selected "define_checkout_success.php" page.
In here, I would include piece of HTML like this:
<img src="http://mysite.com/tracking_sales/my_code/<?= $orders->fields['total_amount']; ?>/<?= $orders->fields['orders_id']; ?>/">
This is almost perfect, except that the total_amount field includes the products as well as shipping costs. I looked through the $orders->fields array and it doesn't even have the shipping amount as a separate field so that I could subtract shipping total from order total to get my subtotal. I need to be able to report the order total without shipping included. Does anyone know if this is available at this page somehow? Or if there's at least a way to get the shipping total to do math to get my subtotal?
Thanks in advance.



