Page 1 of 1

Weight based shipping conundrum

Posted: Tue Apr 26, 2011 11:07 am
by ner0tik
I noticed on weight based shipping if i add 5:0.00 it will allow free shipping on anything 5 pounds or less, what would i need to change so it only gave free shipping on things that were exactly 5 pounds and ignored things of less weight?
i'm hoping its something simple like changing a '<=' to '='

Re: Weight based shipping conundrum

Posted: Tue Apr 26, 2011 11:27 am
by Qphoria
Try this:
4.99:2, 5:0, 10:5, 99999:20

Re: Weight based shipping conundrum

Posted: Tue Apr 26, 2011 11:53 am
by ner0tik
Hi Q. Thanks for the quick reply but unfortunately that won't work for what I'm trying to do the 5:0.00 was just an example. i need the weight based shipping to ignore anything other than exact values. for example if an item weighed less than 4.99 in your example it would still get charged $2 shipping. I need a way for the $2 to only apply if the item weighed exactly 4.99 lbs or charge $20 if it weighed exactly 99999 but ignore everything between the 10 and 99999.

Re: Weight based shipping conundrum

Posted: Tue Apr 26, 2011 7:31 pm
by Qphoria
oh.. then then a code change..

1. EDIT: catalog/model/shipping/weight.php

2. FIND:

Code: Select all

if ($data[0] >= $weight) {
3. REPLACE WITH:

Code: Select all

if ($data[0] == $weight) {

Re: Weight based shipping conundrum

Posted: Wed Apr 27, 2011 10:48 am
by ner0tik
exactly what i needed thanks!