Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Free Shipping for Zero Weight


mpiscopo

Recommended Posts

Posted

I had a need to be able to send small sample packages to potential customers and charge them a fixed charge which included shipping. (for example I would offer them a sample for $3, have them process it online, bypass the shipping charges, and send it to them through regular mail)

 

I accomplished this by setting the weight of the product to "0". Then made minor changes to two files as follows:

 

In catalog/includes/languages/english/modules/order_total/ot_shipping

Changed this:

define('FREE_SHIPPING_DESCRIPTION', 'Free shipping for orders over %s');

To:

define('FREE_SHIPPING_DESCRIPTION', 'No shipping charge for this order');

 

In catalog/checkout_shipping.php

Just before the following line (around line 99):

// process the selected shipping method

if (isset($_POST['action']) && ($_POST['action'] == 'process')) {

 

Add the following if statement (remember, just prior to it):

if ($total_weight == 0) {

$free_shipping = true;

include(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/modules/order_total/ot_shipping.php');

}

 

You will need to set the tare weight to zero or set the number in the IF statement to equal your tare weight.

Posted

Thank you for posting this! I came looking for that exact thing - works great except I had to make one edit.

 

This line that you posted:

include(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/modules/order_total/ot_shipping.php');

 

Needed to be changed to this:

include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');

 

Thanks again!

Amanda

  • 1 month later...
Posted

nifty and simple fix.. Been trying some different things to try and get this SAME result and the other (much more complicated I might add) attempts failed.

 

Now I just have to reconfigure my shipincart to not display with a zero weight freeship item...

 

If I could only get customers to under stand that free shipping on a specific item as a promotional is only on that item, if you add more to the cart you will pay shipping on the rest.

Posted

I've actually been surprised that nobody has been confused about the free shipping on a particular item. I've had people purchase the free shipping item by itself and some with other things which had a shipping charge, no questions from anybody.

 

In the product description I put the following statement in bold print at the end, "NOTE: This price includes shipping. It will be shipped first class mail." You can state something similiar, make it in bold so they see it (since most people skim and don't read web pages).

Posted

Just as an aside I set the tare weight to 0 and it still charge an increase for anything over 0 pounds. So I set the extra amount to 0 and that took care of that. So now ony actuall weights are examined and used.

 

Jim

Semper Fi

Posted

mpiscopo, what a star!

 

This is such a simple mod, yet it does EXACTLY what I've spent hours looking for in the contributions section.

 

VERY WELL DONE :) :) :) :)

  • 4 weeks later...
Posted
Thank you for posting this! I came looking for that exact thing - works great except I had to make one edit.

 

This line that you posted:

include(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/modules/order_total/ot_shipping.php');

 

Needed to be changed to this:

include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');

 

Thanks again!

Amanda

I cant get it to work at check out it says error in shipping

Posted

Very nice option!

Worked like a charm. Like everything else should.

 

Thank you.

Posted

Im interested in using this to LIMIT free shipping if the order weight is over 20LBS.

 

Any help as to why this wont work?

 

  if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) {
if ($total_weight < 20) { 
$free_shipping = true;
echo 'Sorry, This order weighs to much for free shipping...';
}

 

thanks...

  • 2 weeks later...
Posted

:'( Forgive me if this has been posted somewhere else, but will this still allow the free shipping of items over a certain dollar amount.

  • 2 weeks later...
Posted
I had a need to be able to send small sample packages to potential customers and charge them a fixed charge which included shipping.  (for example I would offer them a sample for $3, have them process it online, bypass the shipping charges, and send it to them through regular mail)

 

I accomplished this by setting the weight of the product to "0".  Then made minor changes to two files as follows:

 

In catalog/includes/languages/english/modules/order_total/ot_shipping

Changed this:

define('FREE_SHIPPING_DESCRIPTION', 'Free shipping for orders over %s');

To:

define('FREE_SHIPPING_DESCRIPTION', 'No shipping charge for this order');

 

In catalog/checkout_shipping.php

Just before the following line (around line 99):

// process the selected shipping method

  if (isset($_POST['action']) && ($_POST['action'] == 'process')) {

 

Add the following if statement (remember, just prior to it):

if ($total_weight == 0) { 

$free_shipping = true;

include(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/modules/order_total/ot_shipping.php');

  }

 

You will need to set the tare weight to zero or set the number in the IF statement to equal your tare weight.

 

 

Hello mpiscopo,

 

I still can't get it work.

 

I am having error in UPS and USPS charges 0.1 lbs eventhough item is zero weight.

 

Can you help?

 

Sincerley,

Zaw

Posted

Zaw,

 

Check your tare weight. It's under admin-configuration-shipping/packaging-package tare weight. You probably have 0.1 in that field, set it to 0 and give it a try.

 

Mark

Posted
Zaw,

 

Check your tare weight.  It's under admin-configuration-shipping/packaging-package tare weight.  You probably have 0.1 in that field, set it to 0 and give it a try.

 

Mark

 

Hello Mark,

 

Thank you for helping. I have like this:

 

Package Tare weight. 0

Larger packages - percentage increase. 0

 

I would like to let you know that I am using USPS and UPS at my shopping. When item has 0 weight, UPS get an error and USPS charges money to it.

 

Sincerley,

Zaw

  • 2 weeks later...
Posted

Zaw,

I had the same problem after changing the TARE to zero.

Looking above I changed his last line to match previous statements so it looked like this:

--------------------

if ($total_weight == 0) {  
$free_shipping = true;
include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
 }

--------------------

does that help?

 

* don't take my word for gospel.. I'm a newbie geek :) but it worked

Posted

I tried this and on shopping_cart.php it still shows ALL my shipping options even if this is the ONLY item in my cart.

Is there any way to make it change that page?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...