Forums / Built-in Shipping and Payment Modules / Free Shipping US 48 regardless of price/weight

Free Shipping US 48 regardless of price/weight

Started by sparrowce on 20 Mar 2011, 5:33 PM · Views: 8,215

Results 21 to 40 of 46
25 Mar 2011, 4:01 AM
#21
sparrowce avatar

sparrowce

Zen Follower

Join Date:
Feb 2011
Posts:
207
Plugin Contributions:
0

Free Shipping US 48 regardless of price/weight

Thank you, that is very kind. Don't know if it makes a difference, but I just realized I hadn't called USPS to move from test to production like the tutorial says. I'll call them tomorrow, let me first make sure that part is done in case it makes a difference, and I'll post results back tomorrow, thank you.

25 Mar 2011, 4:03 AM
#22
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping US 48 regardless of price/weight

Make sure your USPS module is also set for Production ... that Test server is useless and you do need a valid, active user id on the module ...

Let us know how it works ...

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!

26 Mar 2011, 12:44 AM
#23
sparrowce avatar

sparrowce

Zen Follower

Join Date:
Feb 2011
Posts:
207
Plugin Contributions:
0

Re: Free Shipping US 48 regardless of price/weight

Woo Hoo! It's working, now the estimator is working and if I choose a state within 48, it says Free Shipping, and if Alaska or Canada, it gives the options on the cart check out and estimator where the buyer can select how they want it shipped. The 2 changes made were to move the USPS module from test to production, and I added a sort order to the Free Shipping and USPS Module based on another post I saw where you recommended a unique non-zero number. Not sure what the sort order means or what difference it makes, any words of wisdom on that would be appreciated.

May I ask the best way or logic to enter the weights? Anything I need to know about that? Right now it's figured at the total weight including packaging, but that may not be the right way to go. What if someone orders 10 books vs 1? The packaging for 10 wouldn't be 10x. I have the Max Package weight at 5000 (not sure where I saw that suggestion), and Package Tare at 0:0, Larger packages percentage 10:0. How do these settings affect the cart? I've read tutorials and lots of posts on them, but it hasn't sunk in yet.

Anyway, thank you for your help.

26 Mar 2011, 12:46 AM
#24
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping US 48 regardless of price/weight

If the Product weights 1lb enter 1 ... then when 10 are ordered it would be 10 x 1 = 10lbs ...

If you need to pad the weight that is what the Tare Rate is for ... otherwise, set the Tare to 0:0 and no extra weight is added to the order ...

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!

26 Mar 2011, 12:47 AM
#25
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping US 48 regardless of price/weight

NOTE: Max weight of 5000 will not work ... USPS won't ship that ... usually 50 is a good Maximum ...

The weight will be broken up into 50 lb boxes ...

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!

26 Mar 2011, 1:02 AM
#26
sparrowce avatar

sparrowce

Zen Follower

Join Date:
Feb 2011
Posts:
207
Plugin Contributions:
0

Re: Free Shipping US 48 regardless of price/weight

Thank you, I will change that to 50 lbs. Which side of the tare 0:0 is what does the padding, and what is the recommended setting to allow for most packaging? Books is the specific item. Thank you again.

26 Mar 2011, 1:03 AM
#27
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping US 48 regardless of price/weight

Tare set to 0:0 means none ...

The left side is a percentage and the right is a weight, so 10:1 would be 10% plus 1lb ...

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!

26 Mar 2011, 1:23 AM
#28
sparrowce avatar

sparrowce

Zen Follower

Join Date:
Feb 2011
Posts:
207
Plugin Contributions:
0

Re: Free Shipping US 48 regardless of price/weight

Ok, thank you, I will change weights to actual book weight and set the tare to allow for packaging. I really appreciate the help, thank you for all your help in getting this set up, I think I'm on my way now!
:smile:

26 Mar 2011, 1:27 AM
#29
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping US 48 regardless of price/weight

You are welcome ... good luck with your site ... :smile:

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!

8 Jan 2012, 5:50 PM
#30
jfreeman avatar

jfreeman

Zen Follower

Join Date:
Apr 2010
Location:
Sutton, MA
Posts:
150
Plugin Contributions:
0

Re: Free Shipping US 48 regardless of price/weight

Hi there - I am having a problem with total_weight somehow being initialized as -1. I have checked the sql database and for every order it is set to -1. Would you happen to know if there is a parameter set wrong or a code change that must be made? Thank you - this is really causing me a problem as I need to send out my order file to a fulfillment company and can not as it stands now. Thank you for any help. Jeff

8 Jan 2012, 6:09 PM
#31
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping US 48 regardless of price/weight

There is no field:
total_weight

in the Zen Cart database ...

Do you have an add on that has added a new field?

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!

8 Jan 2012, 6:15 PM
#32
jfreeman avatar

jfreeman

Zen Follower

Join Date:
Apr 2010
Location:
Sutton, MA
Posts:
150
Plugin Contributions:
0

Re: Free Shipping US 48 regardless of price/weight

that's what I'm trying to find out - can't seem to find it.

8 Jan 2012, 6:18 PM
#33
jfreeman avatar

jfreeman

Zen Follower

Join Date:
Apr 2010
Location:
Sutton, MA
Posts:
150
Plugin Contributions:
0

Re: Free Shipping US 48 regardless of price/weight

However - I am looking to extract the total weight of an order - I'm told it's calculated on the fly for shipping but I need to capture it in my DB as it is being accessed by Magneto Store Manager then it is exported to my fulfillment company.

8 Jan 2012, 7:15 PM
#34
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping US 48 regardless of price/weight

You would need to customize the database table:
orders

and add the field:
total_weight

NOTE: that is if not done by an addon already

Then you would need to customize the order class so that it adds the weight to that field ...

However, I do not know what is using that field total_weight right now to know if something is already trying to populate the field when the order is made ...

Where are you seeing this field that has total_weight in it that is set to -1 in your database?

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!

8 Jan 2012, 7:26 PM
#35
jfreeman avatar

jfreeman

Zen Follower

Join Date:
Apr 2010
Location:
Sutton, MA
Posts:
150
Plugin Contributions:
0

Re: Free Shipping US 48 regardless of price/weight

Thanks for responding - the total_weight has been already added into the orders tables. Something has set it to -1 as a constant. To test - I changed the initializing from -1 to 0 of the field withing orders. I then created an order and then looked into the database - there is now a 0 for every new order. So, something is not setting it and I guess now that's my problem.

Furthermore, I don't know what the code would look like and where to put it withing order.php. Can you help?

8 Jan 2012, 7:43 PM
#36
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping US 48 regardless of price/weight

Look in phpMyAdmin in the configuration table and see if you can find what configuration_key is being used ...

If need be, change it back to -1 and then search the configuration table for the configuration_value of -1 to help you locate it ...

Try doing a search in the Tools ... Developers Tool Kit ... in the bottom input box for configuration_key that you found ...

Are there any references to it? if you look in the code that references it, is there anything to identify the add on?

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!

8 Jan 2012, 9:30 PM
#37
jfreeman avatar

jfreeman

Zen Follower

Join Date:
Apr 2010
Location:
Sutton, MA
Posts:
150
Plugin Contributions:
0

Re: Free Shipping US 48 regardless of price/weight

sorry took me a little while to answer - I found the configuration_key to me total_weight in the database. I did the search as you asked in the Developer's Tools and this is what I came up with:

Look-up in all files Key or Name: Nothing found when typed in total_weight in

**Look-up Template things Key or Name: **
/home/content/v/i/n/vintagemusic/html/zencollections/includes/modules/shipping_estimator.php

/home/content/v/i/n/vintagemusic/html/zencollections/includes/modules/pages/shopping_cart/header_php.php

/home/content/v/i/n/vintagemusic/html/zencollections/includes/modules/pages/checkout_shipping/header_php.php

/home/content/v/i/n/vintagemusic/html/zencollections/includes/modules/pages/checkout_payment/header_php.php

/home/content/v/i/n/vintagemusic/html/zencollections/includes/modules/shipping_estimator.php

**Look-up Classes or things in Classes files Key or Name: **
/home/content/v/i/n/vintagemusic/html/zencollections/includes/classes/shipping.php

/home/content/v/i/n/vintagemusic/html/zencollections/includes/classes/order.php

Look-up Functions or things in Function files Key or Name:

/home/content/v/i/n/vintagemusic/html/zencollections/vinadmin080410/includes/functions/extra_functions/functions_ordertotalweight.php

/home/content/v/i/n/vintagemusic/html/zencollections/includes/classes/order.php

Look-up CONSTANT or Language File defines Key or Name:

/home/content/v/i/n/vintagemusic/html/zencollections/includes/languages/english/popup_shipping_estimator.php

/home/content/v/i/n/vintagemusic/html/zencollections/includes/languages/english/shopping_cart.php

/home/content/v/i/n/vintagemusic/html/zencollections/vinadmin080410/includes/languages/english/ship_fedex.php

/home/content/v/i/n/vintagemusic/html/zencollections/vinadmin080410/includes/languages/english/ship_fedex_reversed.php

Not sure if this is useful or not but it's what I found.

8 Jan 2012, 9:46 PM
#38
jfreeman avatar

jfreeman

Zen Follower

Join Date:
Apr 2010
Location:
Sutton, MA
Posts:
150
Plugin Contributions:
0

Re: Free Shipping US 48 regardless of price/weight

Hmmmmm - I found a file that looks suspect:

zencollections/vinadmin080410/includes/functions/extra_functions/functions_ordertotalweight.php

I hope it is attached to this post -

if it isn't here it is:

<?php /** * * functions_ordertotalweight created by castylx * Shows Total items weight on Admin-Orders screen * * @package functions * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: functions_ordertotalweight.php 4324 2006-09-18 15:25:24Z castylx $ */ //// // Returns the address_format_id for the given country // TABLES: countries; function get_order_total_weight($order_id) { global $db; $total_weight = 0; // Check to see if the weight is already in the order table, // if it is then take it from there, if not then calculate it below // and update the database. $check_order_weight_query = "select total_weight from " . TABLE_ORDERS . " where orders_id = '".(int)$order_id ."'"; $order_total_weight = $db->Execute($check_order_weight_query); $tweight = $order_total_weight->fields['total_weight']; if ($tweight != 0) { if ($tweight != -1) { return $tweight; } } $order_weight_query = "select products_quantity, products_id from " . TABLE_ORDERS_PRODUCTS . " where orders_id ='" . (int)$order_id ."'"; $product_ordered = $db->Execute($order_weight_query); // bof added to get attribute weight for each product in the order. $get_orders_products_id = "select orders_products_id from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id. "'"; $opid = $db->Execute($get_orders_products_id); // eof added to get attribute weight for each product in the order. while (!$product_ordered->EOF) { // Get the product id from the table $products_id = $product_ordered->fields['products_id']; $qty = $product_ordered->fields['products_quantity']; // Get information about the product $product_query = "select products_id, products_weight, products_priced_by_attribute, product_is_always_free_shipping, products_discount_type, products_discount_type_from, products_virtual, products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"; // Here we get the weight of the product and qty if ($product = $db->Execute($product_query)) { if ($product->fields['product_is_always_free_shipping'] != 1 and $product->fields['products_virtual'] != 1) { $products_weight = $product->fields['products_weight']; } else { $products_weight = 0; } $total_weight += ($qty * $products_weight); } // added to get attribute weight for each product in the order. $ord_prod_id = $opid->fields['orders_products_id']; $attribute_weight_query = "select products_attributes_weight, products_attributes_weight_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id. "' and orders_products_id = '" . (int)$ord_prod_id . "'"; $attribute_weight = $db->Execute($attribute_weight_query); while (!$attribute_weight->EOF) { // adjusted count for free shipping if ($product->fields['product_is_always_free_shipping'] != 1) { $new_attributes_weight = $attribute_weight->fields['products_attributes_weight']; } else { $new_attributes_weight = 0; } // + or blank adds if ($attribute_weight->fields['products_attributes_weight_prefix'] == '-') { $total_weight -= $qty * $new_attributes_weight; } else { $total_weight += $qty * $new_attributes_weight; } $attribute_weight->MoveNext(); } // added to get attribute weight for each product in the order. $opid->MoveNext(); $product_ordered->MoveNext(); } // Update the database $update_order_weight_query = "update " . TABLE_ORDERS . " set total_weight='". (float)$total_weight."' where orders_id = '".(int)$order_id ."'"; $db->Execute($update_order_weight_query); return $total_weight; }
8 Jan 2012, 10:21 PM
#39
ajeh avatar

ajeh

Oba-san

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

Re: Free Shipping US 48 regardless of price/weight

Could you go to your Tools ... Developers Tool Kit ... and do a search on:
get_order_total_weight

and see what code is calling it?

NOTE: Do not display paths to your secret admin directory, change those names to something like:
your_secret_admin

in the paths ...

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!

8 Jan 2012, 10:55 PM
#40
jfreeman avatar

jfreeman

Zen Follower

Join Date:
Apr 2010
Location:
Sutton, MA
Posts:
150
Plugin Contributions:
0

Re: Free Shipping US 48 regardless of price/weight

Here is what I found in:

**Look-up in all files Key or Name: **
store/myadmin/includes/modules/usps_autofill_button.php

store/myadmin/includes/functions/extra_functions/functions_ordertotalweight.php

Look-up Template things Key or Name: Nothing

Look-up Classes or things in Classes files Key or Name: Nothing

**Look-up Functions or things in Function files Key or Name: **

store/myadmin/includes/functions/extra_functions/functions_ordertotalweight.php

Look-up CONSTANT or Language File defines Key or Name: Nothing