2011-05-03 172 views
0

我正在尝试导入magento中的xml数据输入。尝试导入它,但似乎它必须在MSOffice-xml或cvs文件中才能成功导入它。我尝试将xml文件解析为cvs,但只能解析xml文件的一部分。我只能解析除NUTRIENTS部分以外的所有内容。我使用在stackoverflow上找到的xml2cvs代码。任何有关如何成功导入此XML数据源的建议。Magento xml datafeed帮助

<product> 
<STOCK_CODE>010003</STOCK_CODE> 
<UPC>705077000440</UPC> 
<Basic_Description>GABA 100GM</Basic_Description> 
<Brand>AST Sports Science</Brand> 
<ProductLine/> 
<ItemName>GABA</ItemName> 
<Title>AST Sports Science GABA</Title> 
<Flavor/> 
<Supplier_Number>1</Supplier_Number> 
<Supplier_Name>AST SPORTS SCIENCE</Supplier_Name> 
<Primary_Category>Amino Acids</Primary_Category> 
<General_Category>Supplements</General_Category> 
<WHOLESALE_PRICE>17.47</WHOLESALE_PRICE> 
<RETAIL_PRICE>24.95</RETAIL_PRICE> 
<LIST_DATE>2004-05-12</LIST_DATE> 
<DISC/> 
<CLT_QOH>Yes</CLT_QOH> 
<FRE_QOH>Yes</FRE_QOH> 
<MES_QOH>Yes</MES_QOH> 
<STR_QOH>Yes</STR_QOH> 
<WND_QOH>Yes</WND_QOH> 
<ORL_QOH>Yes</ORL_QOH> 
<HasNutrition>1</HasNutrition> 
<ValuePreparedCount>0</ValuePreparedCount> 
<Address>120 Capital Drive Golden, CO 80401</Address> 
<Copyright>2007 AST Sports Science, Inc.</Copyright> 
<ItemSize>100</ItemSize> 
<ItemMeasure>g</ItemMeasure> 
<Height>4.625</Height> 
<Width>2.375</Width> 
<Depth>2.375</Depth> 
<ProductWeight/> 
<MASS>0.313</MASS> 
<ExtendedSize>100 g (3.53 oz)</ExtendedSize> 
<CASE_QUANTITY>12</CASE_QUANTITY> 
<Description>GABA, Growth Hormone Potentiator</Description> 
<ProductDetails>GABA is an amino acid classified as a neurotransmitter. Studies have shown GABA to play a key role in the secretion of Growth Hormone. The principle anabolic actions of Growth Hormone including the stimulation of amino acid transport, simulation of protein synthesis reduction of body-fat and the proliferation of cell growth. AST Sports Science selectively imports GABA under rigid quality control conditions. Each batch is HPLC Certified and Laboratory Tested for purity and potency. GABA is a naturally occurring amino acid classified as a neurotransmitter. Some individuals may experience a minor tingling of skin and/ or slight shortness of breath shortly after taking GABA. This is characteristic of this amino acid and quickly subsides.</ProductDetails> 
<Directions>For adults only. As a dietary supplement, take three to five grams mixed with 8 ounce of water, juice or protein shake approximately 30 minutes before sleep.</Directions> 
<Ingredients/> 
<DrugInteractions/> 
<Warnings/> 
<PostDate>2009-08-25</PostDate> 
<HTML>http://www.ast-ss.com</HTML> 
    <thumbnail_url>https://secure.europadatafeed.com/images/50/705077000440.gif</thumbnail_url> 
    <image_url>https://secure.europadatafeed.com/images/250/705077000440.jpg</image_url> 
    <logo_url>https://secure.europadatafeed.com/images/logos/ast.gif</logo_url> 
<image500_URL>https://secure.europadatafeed.com/images/500/705077000440.jpg</image500_URL> 
<MAP_Price/> 
<image_name>705077000440</image_name> 
<image100_URL>https://secure.europadatafeed.com/images/100/705077000440.jpg</image100_URL> 

<SEA_QOH>No</SEA_QOH> 



    <NUTRIENTS> 

    <Nutrient> 
    <AddedItem/> 
    <ISORCONTAINS>0</ISORCONTAINS> 
    <NAME>Gamma Aminobutyric Acid</NAME> 
    <NUTRIENTMASTERID>6260</NUTRIENTMASTERID> 
    <OLDVALUEPREPAREDTYPE>0</OLDVALUEPREPAREDTYPE> 
    <PCT/> 
    <QUANTITY>3.0</QUANTITY> 
    <SERVINGSIZETEXT>3</SERVINGSIZETEXT> 
    <SERVINGSIZEUOM>Scoops</SERVINGSIZEUOM> 
    <SERVINGSPERCONTAINER>33</SERVINGSPERCONTAINER> 
    <TYPE>1</TYPE> 
    <DETAILS/> 
    <UOM>g</UOM> 
    <UPC>705077000440</UPC> 
    <VALUEPREPAREDTYPE>0</VALUEPREPAREDTYPE> 

    </Nutrient> 

</NUTRIENTS> 

</product> 
+0

显示您正在使用 – 2011-05-03 17:06:43

回答

0

导入到Magento的是做 - 它必须是几乎100%完美的导入到Magento的一个非常棘手的事情。我建议使用XML,因为它更易于创建和管理。 CSV是古老的,我有报价的无尽问题,在后面留下特殊的性格无尽的痛苦。

我一直在这个私人项目上工作,但我正在移动我的项目和制作新网站。

如果你有兴趣看看这里的一些启发。

http://code.google.com/p/magentobridge/wiki/Hello

有视频和一些教程,可以帮助you.The软件,尽管在多年的副业发展,有些地区是相当不稳定。

我很想用一个简单的解决方案来帮助你。但是它太复杂了,很多事情都出错了。

现在,天Magento的使用API​​ - 但设置它是另一种痛苦..

+0

代码是否有其他的电子商务平台,将是更适合呢?我还没有致力于Magento。 – user736576 2011-05-04 01:18:54

+0

与每个平台,你会遇到麻烦导入你的数据,因为它需要以正确的方式格式化。 Magento是最大的开源电子商务网站之一,具有高度的可扩展性和多功能性 - 但您需要为此付费或知道如何为自己编程。我制作这个计划的原因是因为我管理几家商店,每个商店都有接近5k的产品,我的程序在几分钟内使用像您这样的外部Feed进行更新。你从哪里得到这个XML? – ppumkin 2011-05-04 05:15:36