2011-05-03 98 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