Forums / General Questions / calling the order total on checkout success , also coupons

calling the order total on checkout success , also coupons

Views: 3,360

Results 1 to 11 of 11
1 May 2007, 2:41 AM
#1
electricshoe avatar

electricshoe

New Zenner

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

calling the order total on checkout success , also coupons

I'm assuming $zv_orders_id contains the order id, But I need to call the orderid and order total on the confirmation page. I'm sorry if this has been asked somewhere else, I've been searching but Im feeling really burnt out right now so I thought I would just ask.:frusty:

Also can anyone point me in the direction of creating coupon codes, the kind that they enter and they get 15% off their order, the GV system is confusing me and lending itself to just being prepaid gift certificates.

Thank you very much for your help and patience:hug:

1 May 2007, 3:21 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: calling the order total on checkout success , also coupons

The orders_id is not created until the order hits the checkout_process ... which is after the checkout_confirmation page ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 May 2007, 3:23 AM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: calling the order total on checkout success , also coupons

You may wish to install the Modules ... Order Totals ... Discount Coupon ot_coupon and then all of the settings will be enabled to start building Discount Coupons under the menu for Gift Certificate/Coupons ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 May 2007, 3:38 AM
#4
electricshoe avatar

electricshoe

New Zenner

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

Re: calling the order total on checkout success , also coupons

Ugh, im sorry, I meant the checkout success page, not confirmation. Like I said I'm totally burnt out at the moment, Im setting up an affiliate lead system on my site and I need to call the id and order total to pay the affiliate properly.

Thank you for the help though:)

The coupon module is installed and when I goto Configuration > GV Coupons There's nothing to create discount coupons just the New Signup Discount Maximum Discount Coupons etc

Once again thanks a lot! you're making my night a lot easier:)

1 May 2007, 3:49 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: calling the order total on checkout success , also coupons

Try the menu choice ... way on the right ... Gift Certificate/Coupons ... that is in your menubar ...

you are peeking in the wrong place for creating the Discount Coupons ...

$zv_orders_id is the orders_id on the checkout_success page ... as to the orders total, you can use that to do a quick look up in the orders table for the field order_total where the orders_id = $zv_orders_id

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 May 2007, 3:55 AM
#6
electricshoe avatar

electricshoe

New Zenner

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

Re: calling the order total on checkout success , also coupons

Thank you, thank you, thank you sooooooo much. I feel very dumb for not remembering that was there, I've been awake for way too long, thanks again, I got it from here, but I think I'll take a nap first!

1 May 2007, 4:51 AM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: calling the order total on checkout success , also coupons

Naps are good ... osmosis will happen if you sleep on the keyboard ... granted you will be branded with a QWERTY on your forehead too ... :eek:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

12 Jun 2011, 5:46 PM
#8
experimentalist avatar

experimentalist

New Zenner

Join Date:
Jun 2011
Posts:
1
Plugin Contributions:
0

Re: calling the order total on checkout success , also coupons

I'm trying to include the order total in a form on the checkout success page. Technically trying to add a 'pay now' button for a payment gateway that doesn't have a zencart module; and had to use the cod page in order to get the order processed without developing a whole new payment method.

This thread suggests it's possible, but doesn't say how (specifically).

The form contains the following line, and I want the '0' to relect the order total.

<input type='text' name='amount' value='0'>

Any help appreciated. Thanks!

26 Jan 2013, 12:04 AM
#9
drbyday avatar

drbyday

New Zenner

Join Date:
Mar 2008
Posts:
50
Plugin Contributions:
0

Re: calling the order total on checkout success , also coupons

experimentalist:

I'm trying to include the order total in a form on the checkout success page. Technically trying to add a 'pay now' button for a payment gateway that doesn't have a zencart module; and had to use the cod page in order to get the order processed without developing a whole new payment method.

This thread suggests it's possible, but doesn't say how (specifically).

The form contains the following line, and I want the '0' to relect the order total.

<input type='text' name='amount' value='0'> ``` > > Any help appreciated. Thanks! <input type='text' name='amount' value='<?php echo $order_total; ?>'>

OR

<input type='hidden' name='amount' value='<?php echo $result->fields['order_total']; ?>'>

of course, you have to query $result->fields['order_total'] from the db in the checkout_success header.php file

$sql = "select value from " . TABLE_ORDERS_TOTAL . " where orders_id = :orderID:";
$sql = $db->bindVars($sql, ':orderID:', $zv_orders_id , 'integer');
$result = $db->Execute($sql);

echo $result->fields['orders_id'];

26 Jan 2013, 12:16 AM
#10
drbyday avatar

drbyday

New Zenner

Join Date:
Mar 2008
Posts:
50
Plugin Contributions:
0

Re: calling the order total on checkout success , also coupons

oops i mean

echo $result->fields['value'];

26 Jan 2013, 1:11 AM
#11
drbyday avatar

drbyday

New Zenner

Join Date:
Mar 2008
Posts:
50
Plugin Contributions:
0

Re: calling the order total on checkout success , also coupons

oooooops i mean

$sql = "select order_total from " . TABLE_ORDERS . " where orders_id = :orderID:";
$sql = $db->bindVars($sql, ':orderID:', $zv_orders_id , 'integer');
$result = $db->Execute($sql);

echo $result->fields['order_total'];