Results 1 to 10 of 24

Hybrid View

  1. #1
    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.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    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!]
    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!

  3. #3
    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

  4. #4
    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.

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    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!]
    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. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    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!]
    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!

  7. #7
    Join Date
    May 2010
    Location
    Texas
    Posts
    508
    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

  8. #8
    Join Date
    May 2010
    Location
    Texas
    Posts
    508
    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

  9. #9
    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!]
    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!

  10. #10
    Join Date
    May 2010
    Location
    Texas
    Posts
    508
    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.

 

 

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

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