Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Built-in Shipping and Payment Modules / How do I get the total price of the order?

How do I get the total price of the order?

Locked
This thread is locked. New replies are disabled.
26 Jun 2007, 11:19 AM
#1
volanttantes avatar

volanttantes

New Zenner

Join Date:
Jun 2007
Posts:
5
Plugin Contributions:
0

Post #1 by volanttantes

I need to implement a specific payment method on my site, and I need to "give" this method the total price,... but how do I get it? I can't find a string/variable that gives the total,... anyone know?

26 Jun 2007, 11:58 AM
#3
volanttantes avatar

volanttantes

New Zenner

Join Date:
Jun 2007
Posts:
5
Plugin Contributions:
0

Post #3 by volanttantes

It only gives the total of the products,... but I want the total,..total :) including shipping, etc.

29 Jun 2007, 11:52 AM
#4
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Post #4 by econcepts

volanttantes:

It only gives the total of the products,... but I want the total,..total :) including shipping, etc.

You would still use that and simply ######### to it the "tax", "shipping", etc... as needed. You would have to create an expression like (this is not the correct one, just an example to get you started):

$products_total = $_SESSION['cart']->show_total();
$products_total + TAX_VARIABLE_HERE + SHIPPING_VARIABLE HERE = NEW TOTAL

Gives you the idea and should get you started. Go through the code in Zen, and you'll find the variables for Tax, Shipping, etc..

You may even be able to use one of the built in Order Classes in Zen to get it working.

Good Luck!

Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information