2013-12-09 20 views
1

我期待在Magento 1.8中添加澳大利亚境内的餐桌价格。在magento中添加澳大利亚餐桌价格

该店位于澳大利亚,仅向澳大利亚运送。当我尝试导入以下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 extension,但不喜欢它是如何臃肿多余的功能,我有没有用。

回答

4

在桌子周围发现了一些东西后,我发现了以下解决方案。

首先,您需要将您需要的状态添加到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" 

我很想让这个查询自动使用region_iddirectory_country_region_name表,如果任何人有关于如何能够提高我将不胜感激任何提示。

+0

这真的是什么参与?看起来很疯狂。 – johnsnails

+0

另外,你的第一行怎么会有'AU'而不是'AUS'? – johnsnails

+0

是的:(这是添加澳大利亚地区所需的最小步骤,在第一行的流氓'AU'上很好捡起来 - 我的一个错字现在我将修改错误 – nickspiel

相关问题