Magento Forum

Page 1 of 2
Table rates doesn’t work anymore
 
Jimmy Rittenborg
Member
 
Avatar
Total Posts:  48
Joined:  2008-07-08
Denmark
 

Hi all,

I’ve just upgraded from ver. 1.4.1.0 (i think) to ver. 1.5.0.1

Everything went smoothly but for some reason Table Rates doesn’t work at all anymore - or the table rate shipping option is available in the frontend as it should but when throwing 14 items in the cart then the shipping should be bumped down to 50.00,- that is just not happening - it stays at 135.00,-

It’s configured it to:

Qty vs. dest

"Land","Region/stat","Postnr.","Fragt af skrøbelig vin","Standard Levering"
"DK"
,"*","*","1","135"
"DK"
,"*","*","12","50"
"DK"
,"*","*","24","0"

I’ve tried both 2 and 3 char country codes (DNK and DK) and that doesn’t change anything

..and it was of cause working before the upgrade smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jimmy Rittenborg
Member
 
Avatar
Total Posts:  48
Joined:  2008-07-08
Denmark
 

WTF.. so i just installed a completely new shop for testing this thing out - all fresh and new but table rates still doesn’t work in this version :S

Can anyone else confirm this?
- i haven’t found any bug report for this issue yet

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jimmy Rittenborg
Member
 
Avatar
Total Posts:  48
Joined:  2008-07-08
Denmark
 

I’ve just found a bug report for this issue here: http://www.magentocommerce.com/bug-tracking/issue?issue=11399

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bondjack
Jr. Member
 
Total Posts:  8
Joined:  2010-10-28
 

Same here, doesn\’t work only shows the highest rate :S

Land,Provincie,Postcode,Subtotaal bestelling (en hierboven),Verzendkosten
NLD,*,*,0.0000,12.5000
NLD,*,*,75.0000,10.0000
NLD,*,*,150.0000,7.5000
NLD,*,*,250.0000,0.0000

who can help me out,

magento 1.5.1

thx

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jimmy Rittenborg
Member
 
Avatar
Total Posts:  48
Joined:  2008-07-08
Denmark
 

Well great - now the fix in the bug report is gone ..

The fix was as i remember of the top of my head, that some strings should be int() somewhere

But maybe its gone because a new version is out where its fixed? i havent checked.. nor updated as there is bugs everywhere in magento especially if you upgrades without building a new shop from scratch almost :S

 
Magento Community Magento Community
Magento Community
Magento Community
 
kingcoen2010
Jr. Member
 
Total Posts:  1
Joined:  2011-01-13
 

Hi All,

Same problem here..

I have fix it via another way, http://www.webshopapps.com/free-stuff/matrixrate-shipping-extension.html

Download that extension and it works :D

It cost me half a day to find it but it works great wink

Good luck everyone !

 
Magento Community Magento Community
Magento Community
Magento Community
 
jenwa
Jr. Member
 
Total Posts:  4
Joined:  2011-02-13
 

OK - so for me the free extension from WebApp doesn’t work and the Table Rates still won’t work with Mag 1.5.

I have contacted WebApp but the extension is free and quite rightly they have paying customers, who they have to help.

Anyone found anymore out about this?  I am stuck :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
miltonlai
Jr. Member
 
Total Posts:  2
Joined:  2011-08-03
 

In Magento ver. 1.5.1.0, we found a bug in Magento’s Table Rates Shipping Method that always return the smallest condition value in the provided country/region/zip.  Let say we are using Price vs Destination, and our tablerate.csv look like below:

Country,Region/State,Zip/Postal Code,Order Subtotal (and above),Shipping Price
TW,*,*,0,9
TW,*,*,50,12
TW,*,*,100,0

It is suppose if the subtotal larger or same as $50, the shipping cost should return $12.  However, the system always return $9 no matter how much we increase the subtotal.

The query found in /app/code/core/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php:

SELECT `shipping_tablerate`.* FROM `shipping_tablerate
WHERE (website_id=:website_id
AND ((
dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = :postcode) OR (dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip '') OR (dest_country_id = :country_id AND dest_region_id AND dest_zip '') OR (dest_country_id = :country_id AND dest_region_id AND dest_zip = :postcode) OR (dest_country_id '0' AND dest_region_id AND dest_zip '')) 
AND (
condition_name = :condition_name
AND (
condition_value <= :condition_value
ORDER BY `dest_country_idDESC, `dest_region_idDESC, `dest_zipDESC LIMIT 1

fetch a single row result that match the provided country/region/zip with the condition_value less than the subtotal.  That sounds making sense however the default condition_value is sort in ASC there for the the first and only fetched row is always the smallest, i.e. “TW,*,*,0,9” in this case.

The bugfix is:
1. find in /app/code/core/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php the row (around row 128) with

->order(array('dest_country_id DESC''dest_region_id DESC''dest_zip DESC'))

replace with

->order(array('dest_country_id DESC''dest_region_id DESC''dest_zip DESC''condition_value DESC'))

That’s it, this correct the sort order therefore the largest possible condition_value that smaller or equal to the provided amount will be fetched.

Hope this is fixed in some later version.

 
Magento Community Magento Community
Magento Community
Magento Community
 
EnnoStuurman
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2008-11-20
 

@miltonlai, the fix (though in core) works fine in Magento 1.6x, please note the file you refer to is not in /app/code/core/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php (around row 128) but in /app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate.php (around row 128)

Hope the Magento Team will fix this soon, since, according to the Knowledge Base, this should work out of the box: http://www.magentocommerce.com/knowledge-base/entry/how-do-i-set-up-table-rate-shipping

 
Magento Community Magento Community
Magento Community
Magento Community
 
miltonlai
Jr. Member
 
Total Posts:  2
Joined:  2011-08-03
 

/app/code/core/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php is for 1.5.x

For 1.6.x, the routine has moved to /app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate.php; however the core should work fine without any fixing (at least 1.6.1 that I’m using does not have any problem).

 
Magento Community Magento Community
Magento Community
Magento Community
 
mclaud
Jr. Member
 
Total Posts:  2
Joined:  2011-09-30
 

I confirm that the bug persist on version 1.6.2 and the fix works.

Thank you

 
Magento Community Magento Community
Magento Community
Magento Community
 
MetizsoftShop
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2011-08-11
 

Zip/Postal Code \\\"*\\\"  this is not working But Zip/Postal Code \\\" \\\" this is working on 1.6.0 magento
File Attachments
tablerates - Copy.xls  (File Size: 1KB - Downloads: 203)
 
Magento Community Magento Community
Magento Community
Magento Community
 
diegodss
Jr. Member
 
Total Posts:  1
Joined:  2011-05-31
 

The solution posted by miltonlai has worked fine on 1.7.0.2
Thanks very much

 
Magento Community Magento Community
Magento Community
Magento Community
 
giaitri321
Jr. Member
 
Total Posts:  1
Joined:  2013-06-22
 

Thank you very much hugging, but looks like it still faces a number of errors

 
Magento Community Magento Community
Magento Community
Magento Community
 
arunpanchariya
Jr. Member
 
Total Posts:  1
Joined:  2013-08-22
 

The table rate does not work anymore please give me a suggestions for this site.i can also get the solution for this table rates.
Arun Panchariya Dubai
Arun Panchariya in Dubai

 
Magento Community Magento Community
Magento Community
Magento Community
 
vierild
Jr. Member
 
Total Posts:  3
Joined:  2013-08-29
 

Thank you very much, I have corrected it

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2