Having problems with table rate shipping in Magento? Perhaps getting a little PHP notice saying “Notice: Undefined index: *”? I remember it being a bit tricky when I tried using it myself. In the end, it turned out to be quite easy once you figure out the fact that you always must specify a country when defining table rate shipping in Magento.
More details can be found on the Magento wiki. To sum it up, you cannot use the “*” wildcard character when setting up your shipping rates. Instead, you’ll have to specify a country as follows:
"Country","Region/State","Zip/Postal Code","Weight (and above)","Shipping Price" US,*,*,10,100
You should now have working table rate shipping. There is, however, a thread from January 2009 on the Magento forums saying that you can work around this by first importing your CSV as above, then changing the record in the “shipping_tablerate” database table, setting “dest_country_id” to 0.
I haven’t tried this method myself but if it works for the forum poster, I suspect that it will also work for the rest of us. One would think that Magento would offer a more explanatory error message but I guess it’s a young platform and it will come later on. Until then, Google is our very best friend for solving most Magento problems.
Other useful tips for table rate shipping:
- To export an example CSV, go to System - Configuration - Shipping methods - Table rate, and make sure your are in the "Main website" scope.
- Edit the file using a plain text editor, such as Notepad on Windows or TextEdit on Mac. I personally use TextMate.
- Of course, take backups.
Thank you for this post. This may be a dumb question, but I am having a lot of difficulty finding where to upload this CSV file once it is complete. Could you give a little more detail?
Thanks, Tom!
Of course. If you’re in the “Main website” or whatever website scope, you should see an “Import” field where you can browse for your file.
When you’ve selected your CSV file, just click the usual “Save” button at the top right corner of the page. :)
If I recall correctly, it should show if there’s an error in the file.
Screenshot: http://tinypic.com/r/246tgus/6