Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Variables that are passed to define_checkout_success.php

Variables that are passed to define_checkout_success.php

Locked

Views: 1,615

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
15 Aug 2007, 3:46 PM
#1
babyandme avatar

babyandme

New Zenner

Join Date:
Aug 2007
Posts:
3
Plugin Contributions:
0

Variables that are passed to define_checkout_success.php

Can anyone help me with what vars are passed to define_checkout_success.php

In particular I need (if possible):

Order Value
Order ID
Number of items ordered

Thank you

AC
https://www.babyandmeyeovil.co.uk

9 Sep 2008, 6:15 PM
#2
dmcontact avatar

dmcontact

New Zenner

Join Date:
Sep 2008
Posts:
4
Plugin Contributions:
0

Re: Variables that are passed to define_checkout_success.php

I am in search of the exact same information. Did you end up solving this one? Or can anyone sound in?

Thanks

9 Sep 2008, 10:21 PM
#3
dmcontact avatar

dmcontact

New Zenner

Join Date:
Sep 2008
Posts:
4
Plugin Contributions:
0

Re: Variables that are passed to define_checkout_success.php

Well, I just put my nose to the grindstone and figured it out for myself, so here it is for anyone who needs it.

If you want to pump values about the order into the checkout success page, there's a global variable available in the page editor section called $orders. It's an object of the queryFactorResult class and contains an array propert called fields which has a whole mess of data you can use. For example:

<?php echo $orders->fields['orders_id']; // The order ID ?> <?php echo $orders->fields['order_total']; // Total amount of order ?>

I am not sure if order_total includes shipping or not, so check on that if you need to break it down, but there's a start. You can just var_dump($orders) to take a look at the whole object when you do a test sale.