Zen Cart Logo
Forums / Customization from the Admin / Total Weight on Admin - Orders not showing

Total Weight on Admin - Orders not showing

Views: 4,262

Results 1 to 20 of 21
27 Jan 2010, 9:52 PM
#1
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Total Weight on Admin - Orders not showing

I go nuts, in one of my stores the Total Weight on my orders in Admin is not showing like shown below.

Total Weight is lbs. oz.
Sub-Total: $196.00
Free Shipping Options (Free Shipping): $0.00
Sales Tax: $0.00
Total: $196.00

On my other store it is showing correctly like below:
Total Weight is 5 lbs. 0 oz.
Sub-Total: $59.95
Free Shipping Options (Free Shipping): $0.00
Sales Tax: $0.00
Total: $59.95

I searched all possible settings, I think, but no success. I can not see what is different in the two stores. I want the total weight to show in the order detail in the admin. It will help me with packing and shipping. This should show up even with Free Shipping option selected. When UPS was selected, of course the weight is there in the UPS line. But when Free Shipping was selected, it does not show. Where is this setting that I get the total weight in my order detail??

4 Feb 2010, 12:49 PM
#2
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Total Weight on Admin - Orders not showing

Still talking to myself? Well, I searched and compared some stuff.

orders.php
Line #539 : <tr><td align="right" colspan="2"><?php echo "Total Weight is $lbsval lbs. $ozval oz."; ?></td></tr>

Should read out and display the weight on the Orders page in Admin. Now I wonder where it pulls the weight from. I want to try and back track this. Any thoughts?

26 Mar 2010, 2:50 AM
#3
xyn1407 avatar

xyn1407

New Zenner

Join Date:
Mar 2010
Posts:
1
Plugin Contributions:
0

Re: Total Weight on Admin - Orders not showing

Any answer on this I have searched every where and cannot seem to find anything. I do not even have a total weight section in there at all.

I am using 1.3.8 and the Fed-Ex Express Shipping module.

30 Mar 2010, 7:25 PM
#4
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Total Weight on Admin - Orders not showing

Nope, no help or solution yet. I think I must have edited something out back when I was trying not to show the weight and did not how to do it right. I just don't remember in what file I edited the code. Was back in the days when I had No clue at all. Now I have no clue what I did back then.... :blush:

One day when I have more time I will compare all my files and see what I can come up with.

30 Mar 2010, 8:33 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Total Weight on Admin - Orders not showing

Where are you calculating these variables:
$lbsval
$ozval

If you are not sure, go to the Tools ... Developers Tool Kit ... and in the bottom input box enter:
$lbsval

and search your Catalog/Admin ...

These are not part of Zen Cart ... is this an add on?

30 Mar 2010, 11:58 PM
#6
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Total Weight on Admin - Orders not showing

Ajeh, please see the attached screen capture. I do not see weight info on the order detail page. I might have altered code somewhere but can't find where. Compared with all my other zen installation and the settings in Admin are the same. Where can I look?

31 Mar 2010, 12:02 AM
#7
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Total Weight on Admin - Orders not showing

And it is in: orders.php
Line #539 : <tr><td align="right" colspan="2"><?php echo "Total Weight is $lbsval lbs. $ozval oz."; ?></td></tr>

Not sure if this is where I need to look for my problem. Might be in some other files? Seems the weight calculation is not happening or not pulled to display. I am just taking wild guesses at this point.

31 Mar 2010, 12:50 AM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Total Weight on Admin - Orders not showing

If that is the only place it comes up ... it sounds like someone tried to customize that file and you need to either comment it out or remove it ...

31 Mar 2010, 2:05 PM
#9
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Total Weight on Admin - Orders not showing

usps_autofill_button.php

has it too:
Line #169 : list($lbsval,$ozval) = explode(".", $tweight);

Line #173 : $tweight-$lbsval)*16;

Line #177 : $lbsval = $lbsval + 1;

Line #181 : define('USPS_DELIVERY_WEIGHTS_POUNDS', "$lbsval");

Line #185 : <input type="hidden" name="shippingWeightInPounds" value="<?php echo $lbsval; ?>" id="shippingWeightInPounds">

orders.php is the version from the USPS shipping mod. Replacing it with the original orders.php does not solve the problem.

31 Mar 2010, 2:19 PM
#10
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Total Weight on Admin - Orders not showing

usps_autofill_button.php and orders.php
are identical on the two installs I compare. One shows the total weight on the orders page correctly, the other does not. Both have the same Free Shipping Options (Free Shipping) rules as shown in the screen shot in above post. Where else can I look? What other files make this weight display correctly?

31 Mar 2010, 2:35 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: Total Weight on Admin - Orders not showing

I have not used this add on ...

You might be able to compare a clean copy of the add on with your two sites to find what is missing for the calculation to work correctly ...

To just remove the line, you could just comment it out on the orders.php ...

1 Apr 2010, 7:58 PM
#12
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Total Weight on Admin - Orders not showing

Why would I comment it out? I need it to give me the weight. Do I miss something here?
BTW I uploaded the working files from the other site but still same result.

1 Apr 2010, 8:18 PM
#13
ajeh avatar

ajeh

Oba-san

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

Re: Total Weight on Admin - Orders not showing

I couldn't tell which you wanted ...

Check the orders.php from the site where it works and the site where it doesn't and compare the two files ...

Then do a search on the site where it works in the Developers Tool Kit for:
$lbsval

and do the same search on the site where it doesn't work ...

This should show you what is missing from the site where it does not work ...

That is not part of Zen Cart, so without seeing your site via FTP it is hard to guess what to tell you to fix ...

6 Apr 2010, 1:11 PM
#14
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Total Weight on Admin - Orders not showing

winmerge, files identical.

Line #539 : <tr><td align="right" colspan="2"><?php echo "Total Weight is $lbsval lbs. $ozval oz."; ?></td></tr>

Let me ask this, the $lbsval and $ozval are variables or values whatever the right term is. They need to be set and pulled from somewhere. Where would that be?

I am sure this has nothing to do with USPS mod. These values get displayed on the order page with any shipping module, free shipper, UPS etc.

6 Apr 2010, 1:19 PM
#15
ajeh avatar

ajeh

Oba-san

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

Re: Total Weight on Admin - Orders not showing

That is correct ... $lbsval and $ozval are variables

This is why I said to do a search for them in the Developers Tool Kit on both sites to see what is difference in the results that come up ...

One site appears to be setting them and the other does not ... so what's missing on the one site?

You should find differences between the two sites when searching for the variables in the Developers Tool Kit ...

6 Apr 2010, 2:59 PM
#16
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Total Weight on Admin - Orders not showing

done, they can only be found in the said files and they are identical. But where does the actual value for them come from? I suspect they do not get set and therefore can not get pulled.

Again, I am looking for the total weight that gets displayed right under the product listing not the ones that are displayed by shipping modules. This must be core function.

I looked also for:
$tweight
$order_total_weight
But all files where they come up are the same.

I did everything you said, I feel we turn in circles but I do appreciate the help.

6 Apr 2010, 3:32 PM
#17
ajeh avatar

ajeh

Oba-san

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

Re: Total Weight on Admin - Orders not showing

Do a search on both sites for:
$oz

6 Apr 2010, 8:06 PM
#18
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Total Weight on Admin - Orders not showing

Identical.
usps_autofill_button.php
Line #169 : list($lbsval,$ozval) = explode(".", $tweight);

Line #170 : if ($ozval == "") {

Line #171 : $ozval = 0;

Line #172 : } else { $ozval = (

Line #174 : $ozval = ceil($ozval);

Line #175 : If ($ozval >= 16) {

Line #176 : $ozval = $ozval - 16;

Line #182 : define('USPS_DELIVERY_WEIGHTS_OUNCES', "$ozval");

Line #186 : <input type="hidden" name="shippingWeightInOunces" value="<?php echo $ozval; ?>" id="shippingWeightInOunces">

orders.php

Line #517 : <tr><td align="right" colspan="2"><?php echo "Total Weight is $lbsval lbs. $ozval oz."; ?></td></tr>

6 Apr 2010, 8:25 PM
#19
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Total Weight on Admin - Orders not showing

Hallelujah, I found the problem. I just went to a lot of settings in Admin and compared the USPS settings in

Configuration - USPS Auto-Fill Config:

I had a value of 1 set in
Delivery: Default Weight (Pounds) = 1
Delivery: Default Weight (Ounces) = (blank)

This combination prevented the weight to be displayed with any shipping mod. I now deleted the value and left blank. Now it works just fine. I just couldn't see why USPS is affecting the general weight display on the order detail page!! :frusty:

Oh, and not only does it work for fresh orders, it now displays right for all my past orders too.

Thank you for all the help.

7 Apr 2010, 4:30 PM
#20
ajeh avatar

ajeh

Oba-san

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

Re: Total Weight on Admin - Orders not showing

You are most welcome ... I was about to send you on a search for:
$tweight

to see what was building that one ... :cool:

Thanks for the update that the configuration of this was incorrect and just needed updating ...