0

I am trying to set different shipping rates for different Canadian provinces (using Magento 1.6.0.0). I have tried uploading several different versions of the tablerates.csv file but so far none have worked.

I get no error messagees when I upload it, but afterwards, either the system reads a single Canada-wide rate and applies it to all orders, or it doesn't recognize any of the rates.

Here's (part of) the relevant section of my most recent tablerates.csv:

CAN,*,*,0.0000,18.0000
CAN,BC,*,0.0000,16.0000
CAN,BC,*,100.0000,12.0000
CAN,BC,*,200.0000,8.0000
CAN,BC,*,250.0000,4.0000
CAN,BC,*,300.0000,0.0000
CAN,AB,*,0.0000,16.0000
CAN,AB,*,100.0000,12.0000
CAN,AB,*,200.0000,8.0000
CAN,AB,*,250.0000,4.0000
CAN,AB,*,300.0000,0.0000
CAN,ON,*,0.0000,18.0000
CAN,ON,*,100.0000,14.0000
CAN,ON,*,200.0000,10.0000
CAN,ON,*,250.0000,6.0000
CAN,ON,*,300.0000,0.0000
CAN,QC,*,0.0000,18.0000
CAN,QC,*,100.0000,14.0000
CAN,QC,*,200.0000,10.0000
CAN,QC,*,250.0000,6.0000
CAN,QC,*,300.0000,0.0000

...ETC

Rates are set for all provinces and territories, not copied here because that would make for a very long list. I've also tried this without the "default" Canada-wide rate line at the top -- when I use the example I pasted in, only the "default" Canada-wide rate is used; when I use this file with the "default" line removed, no rates are recognized.

Any advice would be greatly appreciated!!

Thank you.

1

This should be supported. Its hard to see exactly what you are doing here but it looks like you are filtering just on country and state, which table rates should support without any problem.

Table rates works on best match so if it finds a state that is matching it will stop searching.

As its not in your case it means either the state in your destination is not in the uploaded spreadsheet or your spreadsheet is wrong. I suggest you try the following:

1) Ensure the csv file is actually getting uploaded to the table shipping_tablerate 2) Put a log in to check the destination state (can look at $request object in the tablerate carrier for this 3) Log out the sql being sent when its attempting to get the rate in the tablerate carrier

Better logging in magento would resolve issues here, WebShopApps have a logger we put in all our extensions which is open sourced on github, there is also one in use on the Hackathon. Unfortunately there is no debug logging built into magento.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.