Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Aug 2007
    Posts
    59
    Plugin Contributions
    0

    Default Display Total weight in Admin/orders

    Is there a way to display the total weight of an order on the admin/order page? I do get weight total for some shipping methods and not for others. If the order uses USPS, then I do get a weight total next to the shipping cost. The Fedex module does not display the weight, just the cost. So it seems the weight total is fed to the order page from the shipping module and is module dependent. The shopping cart tracks the total weight plus tare weight. It would be nice to get this to display in the orders. Thanks.

    I am using ZC 1.3.7

    Mark
    www.essential-stuff-store.com

  2. #2
    Join Date
    Mar 2008
    Posts
    21
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    Did anyone ever figure out how to do this? If calculating the order weight is too complicated to do from the admin interface, I'd be happy to add a field to the orders table and save the weight when the order is saved. I'm just not sure where the best place to do this is.

    (And the site is live, so I don't want to have to do too much random experimenting if I can help it. :-)

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,929
    Plugin Contributions
    6

    Default Re: Display Total weight in Admin/orders

    I would add a new field to the orders table as:
    shipping_weight_total decimal(14,5)

    hint: it will match future updates ...
    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.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  4. #4
    Join Date
    Mar 2008
    Posts
    21
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    Thanks for the hint!

    You don't happen to know off the top of your head where the order is saved, do you, and if the weight is available at that time? I followed the process up to where it starts using the weight in the shopping cart, then the "I've had enough of this!" kicked in and I gave up.

  5. #5
    Join Date
    May 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    I've added the field to the orders table, as you suggested, but I'm unsure where in all the files to find/modify the SQL insert statement to put this in the orders table after a successful checkout. Can anyone please point me in the right direction.

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,929
    Plugin Contributions
    6

    Default Re: Display Total weight in Admin/orders

    Look in the orders.php class and see where the tables are updated with each order for:
    orders
    orders_products
    orders_products_attributes
    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.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  7. #7
    Join Date
    May 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    Thank you Ajeh,


    To all searching for a UPS ODBC integration to UPS World Ship 2009 v11, here is what I did:

    *****Note******
    World Ship must already be installed on a windows PC that has tcp access to your database server port 3306. UPS has WorldShip available for free from your online account tools. From a security standpoint, I would not probably try this across the Internet unless your host offers SSL connections and can firewall access to the database server port 3306 to allow only connections from your single world ship IP address. If your DB server is on your Lan, then you can manage the security directly.
    ***************

    1. Add a read only user to your zen-cart database. This will allow you to create a System or User DSN on the PC with World Ship installed.

    2. On the PC with World Ship installed download the MySQL ODBC v 3.51 connector (the newest one causes and exception in worldship) from http://dev.mysql.com/downloads/connector/odbc/3.51.html Install this.


    3. After the MySQL ODBC Driver install go to Start -> Control Panels -> Administrative Tools -> Data Sources (ODBC). Click on the System DSN tab and click Add... Select the "MySQL 3.51 ODBC 3.51 Driver" and Click Finish.

    In the Connector/ODBC window enter the following:
    Data Source Name: ZENCART
    Description: [Whatever you want]
    Server: [IP Address of your DB Server]
    User: [The read only account you just made in step 1]
    Password: [just what it is]

    Test the connection.


    4. Follow the instructions in the document titled "Import Shipment Data Using the ODBC Feature and Keyed Import" found here: http://www.ups.com/content/us/en/res...nts/index.html

    This is fairly straight forward except on step 4, you will select "By Known ODBC Source" instead of "By File" like the instructions. You only need to enter the name of your "Data Source Name" from step 3 in the "Data Source Name (DSN):" box if you entered the username and password in step 3.

    Complete the rest of the instructions as described in the UPS Document.


    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.

    Now in WorldShip just go to Import/Export Data -> Keyed Import -> More... and select the new map you created. It will prompt you for an order id then fill in all the fields for you. You can also set this up to automatically print the labels on new orders (Hands-Off Shipping), but I would get very comfortable with this hack before doing this.

    Good Luck, I hope this helps someone else. If there is a way to override the order.php file I would recommend doing so, but I am pretty new to this so I'm not sure where I should put it.

    Thanks,
    -Cory
    Last edited by coryinit; 20 May 2009 at 07:25 PM. Reason: Adding a left out keyword

  8. #8
    Join Date
    Apr 2010
    Posts
    1
    Plugin Contributions
    0

    Default Re: Display Total weight in Admin/orders

    I have added the shipping_weight_total field to the orders table. I however, can not get the weight to display on the orders page in admin.

    I have tried several different ways of polling the db with no success.

    Does anyone have any suggestions as to the code that should be added to the orders.php to have the information displayed?

    Thanks!

    (using zen 1.3.8) no mods to the orders.php file.

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,929
    Plugin Contributions
    6

    Default Re: Display Total weight in Admin/orders

    How are you trying to get the weight from the orders table?
    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.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,929
    Plugin Contributions
    6

    Default Re: Display Total weight in Admin/orders

    NOTE: the shipping weight is already, by default, stored in the orders_total on the class when it is ot_shipping and the orders_id matches the orders_id in the orders table ...
    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.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 24 Aug 2009, 07:53 PM
  2. Replies: 7
    Last Post: 24 Nov 2008, 04:25 AM
  3. function to get the total weight?
    By bangsters in forum General Questions
    Replies: 2
    Last Post: 8 Nov 2007, 02:12 PM
  4. shipping cost calculated by total weight not weight of individual postage cost - help
    By vandiermen in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 31 Jul 2007, 05:51 AM
  5. UPS shipping total weight is incorrect, estimate weight button is correct
    By cmwords in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 27 Jun 2007, 05:43 AM

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
  •