Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24
  1. #11
    Join Date
    May 2010
    Location
    Texas
    Posts
    387
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    Quote Originally Posted by coryinit View Post
    5. If you want to add the total shipping weight (without the tare corrections, i.e. small to medium package 10:1) to the import you will need to run this command from either the mysql command line or the sql patches:

    **** NOTE ****
    BE SURE TO CHANGE "prefix" IN THE FOLLOWING COMMAND TO WHATEVER YOUR TABLE PREFIX IS
    *************

    Code:
    alter table prefix_orders add shipping_weight_total decimal(14,5);
    Then edit your /includes/classes/order.php on line 613 where it reads:

    Code:
    'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR']
    );
    change it to this:

    Code:
    'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR'],
    'shipping_weight_total' => $_SESSION['cart']->weight
    );
    Once this is done you will need to edit the map in world ship by clicking on Import/Export Data -> Create / Edit Map... and selecting the map you made above. Just connect the shipping_weight_total to the appropriate WorldShip weight field.
    -Cory
    Is this still the best method to add total shipping weight to zen_orders? I have v1.3.9e

  2. #12
    Join Date
    May 2010
    Location
    Texas
    Posts
    387
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    More than a year with no response....

    Anyone know how to access the total order weight?
    I need to export this value to an external shipping application

  3. #13
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Display Total weight in Admin/orders

    Do you need the Order Weight:

    1 before the order is complete
    if so, are you in the checkout when you need this?
    or, are you in the shop as the order is being made but not yet in the checkout?

    2 after the order is complete
    if so, are you in the checkout, such as the checkout_success?
    or, are you in the shop, such as the My Account
    or, are you in the Admin?
    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: v1.5.5]
    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!

  4. #14
    Join Date
    May 2010
    Location
    Texas
    Posts
    387
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    Quote Originally Posted by Ajeh View Post
    Do you need the Order Weight:

    1 before the order is complete
    if so, are you in the checkout when you need this?
    or, are you in the shop as the order is being made but not yet in the checkout?
    No, the checkout process is fine as is.
    Quote Originally Posted by Ajeh View Post
    2 after the order is complete
    if so, are you in the checkout, such as the checkout_success?
    or, are you in the shop, such as the My Account
    or, are you in the Admin?
    This is for order fulfillment long after orders are placed. We use the "Export Shipping & Order Information" plugin which outputs order data to a .csv file. The file is then imported into a shipping app that generates labels.
    The element missing from the export is the shipping weight for each order.
    If I knew where in the database the order total weight was kept (if it is kept), then I can alter the plugin to also output the total order weight for each order.

  5. #15
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Display Total weight in Admin/orders

    You need to add a new field, such as:
    shipping_weight_total

    to the table:
    orders

    use the sql:
    Code:
    alter table orders add shipping_weight_total decimal(14,5);
    which you can run in the Tools ... Install SQL Patches ...

    or, use phpMyAdmin, as be sure to address the table prefix if you use them ...

    Then, you need to save the weight to a session variable, in the shipping class:
    Code:
          switch (true) {
            // large box add padding
            case(SHIPPING_MAX_WEIGHT <= $shipping_weight):
              $shipping_weight = $shipping_weight + ($shipping_weight*($zc_large_percent/100)) + $zc_large_weight;
              break;
            default:
            // add tare weight < large
              $shipping_weight = $shipping_weight + ($shipping_weight*($zc_tare_percent/100)) + $zc_tare_weight;
              break;
          }
    
    // bof: save weight for later use
      $_SESSION['total_order_weight'] = $shipping_weight;
    // eof: save weight for later use
    Next, you need to customize the order class to add the weight to the table:
    orders

    with:
    Code:
                                'order_total' => $this->info['total'],
                                'order_tax' => $this->info['tax'],
                                'currency' => $this->info['currency'],
                                'currency_value' => $this->info['currency_value'],
                              'shipping_weight' => $_SESSION['total_order_weight'],
                                'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR']
                                );
    and that should work with most shipping modules ...

    NOTE: be careful of shipping modules where there are other weight calculations in it that may be different than the weight calculation of shipping class and will need to be addressed differently ...
    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: v1.5.5]
    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!

  6. #16
    Join Date
    Dec 2004
    Posts
    1,031
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    I am loosing it. I have one site where I always see the total weight of an order (in Adming - Customers - Orders) just below the purchased products it shows:
    Total Weight is 12 lbs. 0 oz.
    Sub-Total: $135.00
    Free Shipping Options (Free Shipping): $0.00
    Sales Tax: $0.00
    Total: $135.00

    On all my other up to date 1.5.1 sites it does not show a Total Weight line with Free Shipping Options used. If UPS and USPS shipping options were used to complete the order, shipping weight shows on the order detail in admin. I don't believe I've done any of the above mentioned modifications on this particular site. If, then it was many years ago on an very old Zen version. I've been upgrading this site from 1.3.0 on to today so it is possible that an add on executed some sql in the past that added the needed stuff. How do I go about to have this Total Weight show on my order detail page that I need to process the orders. I need the weight calculation on Free Shipping as well. Not sure why this is not standard anyway. If I need to ship goods, it has a weight even if customer does not pay for it.
    Live and learn... the Zen way.

  7. #17
    Join Date
    Dec 2004
    Posts
    1,031
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    Would the USPS.com Click-n-Ship AutoFill Button module return total weight on the order detail in admin for ALL order no matter if free shipping? Maybe just installing this module could do the trick or one could implement some of the code just for weight display purpose. Just a thought...

    I would rather just fix it without needing to install/merge this whole add on.
    Live and learn... the Zen way.

  8. #18
    Join Date
    Dec 2004
    Posts
    1,031
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    Quote Originally Posted by Ajeh View Post
    You need to add a new field, such as:
    shipping_weight_total

    to the table:
    orders

    use the sql:
    Code:
    alter table orders add shipping_weight_total decimal(14,5);
    which you can run in the Tools ... Install SQL Patches ...

    or, use phpMyAdmin, as be sure to address the table prefix if you use them ...

    Then, you need to save the weight to a session variable, in the shipping class:
    Code:
          switch (true) {
            // large box add padding
            case(SHIPPING_MAX_WEIGHT <= $shipping_weight):
              $shipping_weight = $shipping_weight + ($shipping_weight*($zc_large_percent/100)) + $zc_large_weight;
              break;
            default:
            // add tare weight < large
              $shipping_weight = $shipping_weight + ($shipping_weight*($zc_tare_percent/100)) + $zc_tare_weight;
              break;
          }
    
    // bof: save weight for later use
      $_SESSION['total_order_weight'] = $shipping_weight;
    // eof: save weight for later use
    Next, you need to customize the order class to add the weight to the table:
    orders

    with:
    Code:
                                'order_total' => $this->info['total'],
                                'order_tax' => $this->info['tax'],
                                'currency' => $this->info['currency'],
                                'currency_value' => $this->info['currency_value'],
                              'shipping_weight' => $_SESSION['total_order_weight'],
                                'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR']
                                );
    and that should work with most shipping modules ...

    NOTE: be careful of shipping modules where there are other weight calculations in it that may be different than the weight calculation of shipping class and will need to be addressed differently ...
    Tried this too and I get a "WARNING: An Error occurred, please refresh the page and try again. " at the last step of checkout where the order confirmation should display. If I remove the line "'shipping_weight' => $_SESSION['total_order_weight']," again, then I can checkout. I must say I use COWOA, maybe that makes it fail?
    Live and learn... the Zen way.

  9. #19
    Join Date
    Dec 2004
    Posts
    1,031
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    I notice that my orders table has the field total_weight stored in the 1.3.9a installation where the weight displays correctly. I think this is from the USPS auto fill mod.

    How do other store users get to display total weight of an order with free shipping? We all need to ship the products even if we grant free shipping to our customers. I don't understand that this is not a present and ready function of core install. Did I miss something?
    Live and learn... the Zen way.

  10. #20
    Join Date
    Dec 2004
    Posts
    1,031
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    Well, as nobody joins in I keep posting my progress. I have now installed the newest USPS Auto fill 1.6 and this does give me the order total weight even on older existing orders. Kind of overkill as I don't want the USPS autofill anymore on my newest installs. If somebody has another working solutions it would be much appreciated.
    Live and learn... the Zen way.

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v139h Total weight on orders.php
    By wirefram in forum Managing Customers and Orders
    Replies: 6
    Last Post: 23 Jul 2012, 05:21 PM
  2. Total Weight on Admin - Orders not showing
    By mydanilo in forum Customization from the Admin
    Replies: 20
    Last Post: 30 Sep 2011, 08:14 AM
  3. display the total weight In admin
    By dmagic in forum Managing Customers and Orders
    Replies: 4
    Last Post: 3 May 2011, 02:28 PM
  4. Replies: 1
    Last Post: 9 Sep 2009, 12:11 PM
  5. Replies: 1
    Last Post: 24 Aug 2009, 07:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR