3

I am creating a custom shipping method by following this tutorial. Now I want to access the region name in the collectRates method. I can access the region_code if the State/Province field is a dropdown, but it isn't the case for all the countries.

I actually want the shipping method to be available to only a certain state. How can I do this?

Thanks

  • that is my question too – ali gh Nov 20 '16 at 16:04
  • @aligh I couldn't get the region_code if the "State/Province" is not a dropdown. So, I added the "State/Province" for the needed country by directly going to the DB and adding them. The table you'll need is directory_country_region. For further details, you can see this (blog post)[excellencemagentoblog.com/blog/2012/01/31/… – V.S Nov 20 '16 at 19:17

Your Answer

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

Browse other questions tagged or ask your own question.