簡體   English   中英

在magento中添加澳大利亞表費率

[英]Adding australian table rates in magento

我希望在Magento 1.8中為澳大利亞國際航運提供更多的機票價格。

該商店位於澳大利亞,僅運往澳大利亞。 當我嘗試導入以下CSV時,Magento會發出錯誤,指出“文件尚未導入”且代碼為“無效”。

"Country","Region/State","Zip/Postal Code","Order Subtotal (and above)","Shipping Price"
"AU","*","*","250","0"
"AUS","VIC","*","0","11"
"AUS","NSW","*","0","12"
"AUS","QLD","*","0","13"
"AUS","ACT","*","0","14"
"AUS","NT","*","0","15"
"AUS","WA","*","0","16"
"AUS","SA","*","0","17"
"AUS","TAS","*","0","18"

我知道並且過去曾使用過fontis擴展程序 ,但不喜歡使用我沒有用的額外功能有多臃腫。

在表格中找到一些后,我找到了以下解決方案。

首先,您需要將您需要的狀態添加到directory_country_region表中。 確保這是自動遞增並使用AU作為country_id

我運行了以下查詢:

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');

插入這些行后,請記下它們各自的region_id ,以便在directory_country_region_name表中使用。

我逐行運行以下查詢。 確保更新region_id以匹配上一個查詢中創建的ID。

INSERT 
    INTO `your-database-name`.`directory_country_region_name` 
        (`locale`, `region_id`, `name`) 
    VALUES 
        ('en_AU', '485', 'Victoria'),
        ('en_AU', '486', 'South Australia'),
        ('en_AU', '487', 'Western Australia'),
        ('en_AU', '488', 'Northern Territory'),
        ('en_AU', '489', 'Queensland'),
        ('en_AU', '490', 'New South Wales'),
        ('en_AU', '491', 'Australian Capital Territory'),
        ('en_AU', '492', 'Tasmania');

現在使用澳大利亞地址創建一個新帳戶,並注意我們現在得到一個下拉列表,填充這些值! 好哇!

我現在可以在沒有問題的情況下在Magento中將表格中的CSV導入。

"Country","Region/State","Zip/Postal Code","Order Subtotal (and above)","Shipping Price"
"AUS","*","*","250","0"
"AUS","VIC","*","0","11"
"AUS","NSW","*","0","12"
"AUS","QLD","*","0","13"
"AUS","ACT","*","0","14"
"AUS","NT","*","0","15"
"AUS","WA","*","0","16"
"AUS","SA","*","0","17"
"AUS","TAS","*","0","18"

我很想讓這個查詢自動使用directory_country_region_name表中的region_id ,如果有人有任何關於如何改進它的提示我會非常感激。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM