Page 1 of 1
Weight based shipping under 1.00? (bug?)
Posted: Mon Nov 09, 2009 11:11 pm
by i2Paq
I've installed OC 1.3.3 and I'm trying to configure the weight based shipping but I cannot get it completly to work.
I want to offer free shipping below 10Kg and above it will cost € 13,50.
I have configured my product with a weight of 0.250Kg each.
In the Weight base shipping module I have the following: 10:1.00,20:13.50
If I buy 1 item at checkout iw shows me: Netherlands (0.250kg) € 1.00.
But If I lower the price below 1.00 the module does not showup during checkout.
Am I missing something or is this a bug?
Re: Weight based shipping (bug?)
Posted: Wed Nov 11, 2009 6:25 am
by Daniel
i'll look into this.
Re: Weight based shipping (bug?)
Posted: Wed Nov 11, 2009 6:43 am
by i2Paq
Daniel wrote:i'll look into this.
I also reported it as a Bug in the Bugtracker.
Just to be sure, sorry if this was not necessery
Re: Weight based shipping (bug?)
Posted: Wed Nov 11, 2009 7:59 am
by Qphoria
This is the problem:
In catalog/model/shipping/weight.php
Line 44:
Change to :
Re: Weight based shipping under 1.00? (bug?)
Posted: Thu Nov 12, 2009 2:00 am
by i2Paq
Qphoria wrote:argh.. stupid php thinks 0 == ''
Try:
Huble I bow for The Master
I also updated the BUG tracker
here.
Re: Weight based shipping under 1.00? (bug?)
Posted: Thu Nov 12, 2009 6:22 am
by dannowatts
Qphoria wrote:argh.. stupid php thinks 0 == ''
Try:
why'd you change it to a string, from a float, from an integer?
rocksteady,
danno~
Re: Weight based shipping under 1.00? (bug?)
Posted: Fri Nov 13, 2009 11:29 pm
by Qphoria
There is no type conversion. I am only using it for the conditional.
In php
0 == "" <--int (Original way. Didn't allow sub 1.00 prices)
0.00 == "" <--float (Solution attempt 1. Allowed sub 1.00, but not 0.00)
but "0.00" != "" <-- string (Final Solution. Allows sub 1.00 and 0.00)
If you have:
10:0.00, 20:5.00, 30:10.00 then you DO want free shipping for 10 or less
if you used the (int), 0.00 would show up as 0 which = "".
If you used the (float), 0.00 would show up as 0.00 which still = "".
So i made it check for the existence of an actual string value for the price
Re: Weight based shipping under 1.00? (bug?)
Posted: Sat Nov 14, 2009 4:40 am
by dannowatts
gotcha.
thanks!
rocksteady,
danno~
Re: Weight based shipping under 1.00? (bug?)
Posted: Fri Dec 04, 2009 6:32 am
by deeve
I've read all the above but can't understand why my schema of 2 different product weights 1 & 1.5kg doesn't calculate a single item of 1.5 as 1.5 x the shipping weight but prefers to defer it as 2 @ the 1kg rate!
http://forum.opencart.com/viewtopic.php?f=22&t=8391
Re: Weight based shipping under 1.00? (bug?)
Posted: Thu Apr 01, 2010 8:10 pm
by i2Paq
Using 1.4.6 I see that this bug has re-apeard.
Reported in the 1.4.6 Bug topic
here.
Re: Weight based shipping under 1.00? (bug?)
Posted: Fri Apr 02, 2010 12:19 pm
by Qphoria
fixed in next version to allow 0