Created
June 7, 2016 02:02
-
-
Save anil3a/1afab31835d8d292870e61b735d6205e to your computer and use it in GitHub Desktop.
Add support for shipping in Australia for Magento table rates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// table rate CSV example: | |
"Country","Region/State","Zip/Postal Code","Order Subtotal (and above)","Shipping Price" | |
"AU","*","*","250","0" | |
"AU","VIC","*","0","10" | |
"AU","NSW","*","0","12" | |
"AU","QLD","*","0","12" | |
"AU","ACT","*","0","12" | |
"AU","NT","*","0","12" | |
"AU","WA","*","0","12" | |
"AU","SA","*","0","12" | |
"AU","TAS","*","0","12" | |
// insert regions into directory_country_region table | |
INSERT | |
INTO `your-database-name`.`directory_country_region` | |
(`region_id`, `country_id`, `code`, `default_name`) | |
VALUES | |
(NULL, 'AU', 'VIC', 'Victoria'), | |
(NULL, 'AU', 'NSW', 'New South Wales'), | |
(NULL, 'AU', 'QLD', 'Queensland'), | |
(NULL, 'AU', 'ACT', 'Australian Captial Territory'), | |
(NULL, 'AU', 'NT', 'Northern Territory'), | |
(NULL, 'AU', 'WA', 'Western Australia'), | |
(NULL, 'AU', 'SA', 'South Australia'), | |
(NULL, 'AU', 'TAS', 'Tasmania'); | |
// make sure the region ID is updated to the respective region ids in directory_country_region | |
INSERT | |
INTO `your-database-name`.`directory_country_region_name` | |
(`locale`, `region_id`, `name`) | |
VALUES | |
('en_AU', '***', 'Victoria'), | |
('en_AU', '***', 'South Australia'), | |
('en_AU', '***', 'Western Australia'), | |
('en_AU', '***', 'Northern Territory'), | |
('en_AU', '***', 'Queensland'), | |
('en_AU', '***', 'New South Wales'), | |
('en_AU', '***', 'Australian Capital Territory'), | |
('en_AU', '***', 'Tasmania'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment