开发者

Magento table rate not working after migration

We migrated from 1.4 to 1.6 I am not sure if this is a problem in the migration but our table rate shipping is not worked.

I have this 2 examples;

This one works

Country    Region/State     Zip/Postal Code    Weight (and above)   Shipping Price
USA        *                *                  80                   145

This one does not work

Country    Region/State     Zip/Postal Code    Weight (and above)   Shipping Price
USA        AL               *                  80                   145

I have che开发者_如何学Gocked blogs, etc, and I dont see a problem on the files. Any idea?


the condition sql for tablerate checks (among other thing) that dest_zip = '' (cfr Mage_Shipping_Model_Mysql4_Carrier_Tablerate line 135).
As you have * for this field the condition isn't met.
Best solution would be to edit the db, replacing * by nothing (empty field).
In my case I couldn't (dunno why, the db kept replacing my empty string with 0), so I had to override the class to add one line:

"dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = :postcode",
"dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = ''",
"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = ''",
"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = '0'",//added line
"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = :postcode",
"dest_country_id = '0' AND dest_region_id = 0 AND dest_zip = ''",

HTH

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜