Forums / Managing Customers and Orders / Total weight on orders.php

Total weight on orders.php

Started by wirefram on 22 Jul 2012, 3:50 PM · Views: 2,181

Results 1 to 7 of 7
22 Jul 2012, 3:50 PM
#1
wirefram avatar

wirefram

New Zenner

Join Date:
Apr 2011
Posts:
95
Plugin Contributions:
0

Total weight on orders.php

Hi

I've been seeking answers and can't find any...

How can i display the total weight of customers products ordered on orders.php for the admin, the page where i edit the orders.

There are all others infos BUT the total weight....

Many thanks!

L.
:blush:

**2nd market domain names for sale **
dot com only !
http://www.ventesites.com

22 Jul 2012, 5:22 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,751
Plugin Contributions:
56

Re: Total weight on orders.php

The weight of the order is actually not saved once the order is complete. You could modify the checkout process to save it, but once the order has been placed and it's visible in admin, you'd have to go through all the products and their attributes to figure out the weight.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

22 Jul 2012, 5:48 PM
#3
wirefram avatar

wirefram

New Zenner

Join Date:
Apr 2011
Posts:
95
Plugin Contributions:
0

Re: Total weight on orders.php

Hi

Thanks for your answer but I don't get it...

If I select admin>configuration>shipping packaging>Display Number of Boxes and Weight Status=2

the total weight shows everywhere when the order is complete, orders.php included, it is also on the invoice.php...

what i want is to show it only on orders.php, so as it does show there must be a way to able it on orders.php only but i can't find **the code used **to display the total weight probably because it is something set up in the configuration...

Any idea where i can find this code?

Thanks

swguy:

The weight of the order is actually not saved once the order is complete. You could modify the checkout process to save it, but once the order has been placed and it's visible in admin, you'd have to go through all the products and their attributes to figure out the weight.

**2nd market domain names for sale **
dot com only !
http://www.ventesites.com

23 Jul 2012, 7:30 AM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Total weight on orders.php

wirefram:

Any idea where i can find this code?

Is the global $shipping_weight variable of any use?

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

23 Jul 2012, 9:54 AM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,751
Plugin Contributions:
56

Re: Total weight on orders.php

$shipping_weight is a catalog side variable.
This information is not available on the admin side. You will have to write code to figure it out.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

23 Jul 2012, 3:32 PM
#6
wirefram avatar

wirefram

New Zenner

Join Date:
Apr 2011
Posts:
95
Plugin Contributions:
0

Re: Total weight on orders.php

But invoice.php and orders.php ARE on the admin side, the total weight shows up on both with the configuration i described previously therefore there must be a variable available on the admin side to display this total weight....

otherwise, where does this total weight come from on those 2 files available only from the admin?

there is something used by the script to display this total weight on invoice.php and orders.php but i can't figure out what/where this is....

swguy:

$shipping_weight is a catalog side variable.
This information is not available on the admin side. You will have to write code to figure it out.

**2nd market domain names for sale **
dot com only !
http://www.ventesites.com

23 Jul 2012, 4:21 PM
#7
wirefram avatar

wirefram

New Zenner

Join Date:
Apr 2011
Posts:
95
Plugin Contributions:
0

Re: Total weight on orders.php

Looks like total weight is defined in the class order.php:

$shipping_method_query = "select title, value
from " . TABLE_ORDERS_TOTAL . "
where orders_id = '" . (int)$order_id . "'
and class = 'ot_shipping'";

$shipping_method = $db->Execute($shipping_method_query);

the variable must be $shipping_method I guess i have to stick the query somewhere on orders.php to use this variable... any idea about this?

**2nd market domain names for sale **
dot com only !
http://www.ventesites.com