2011-05-03 2 views
0

J'essaie d'importer un flux de données xml de produits dans magento. Essayez de l'importer mais il semble que cela doive être dans le fichier MSOffice-xml ou cvs pour l'importer avec succès. J'essaye d'analyser le fichier xml en cvs, mais j'ai seulement pu analyser une section du fichier xml. J'ai seulement pu analyser tout sauf la section NUTRIENTS. J'utilise le code xml2cvs trouvé sur stackoverflow. Toute suggestion sur la façon d'importer avec succès ce flux de données XML.Magento xml datafeed help

<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

Afficher le code que vous utilisez –

Répondre

0

L'importation dans Magento est une opération très délicate: elle doit être presque 100% parfaite pour être importée dans Magento. Je suggère d'utiliser XML car il est plus facile de créer et de gérer. CSV est vieux et j'ai eu des problèmes sans fin avec des citations, une douleur sans fin à l'arrière.

J'ai travaillé de temps en temps sur ce projet privé, mais je suis en train de déplacer mes projets et de créer de nouveaux sites.

Si cela vous intéresse, jetez un coup d'œil ici pour un éclairage.

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

Il y a des vidéos et des tutoriels qui pourraient aider you.The logiciels en dépit de nombreuses années de développement sur la ligne de touche est assez instable dans certaines régions.

J'aimerais vous aider ici avec une solution simple ... mais c'est tellement complexe et tellement de choses vont mal.

Maintenant, un jour Magento utilise une API - mais sa mise en place est une autre douleur ..

+0

Y at-il une autre plate-forme de commerce électronique qui serait mieux adapté pour cela? Je ne m'étais pas encore engagé sur Magento. – user736576

+0

avec chaque plate-forme, vous rencontrerez des problèmes d'importation de données car il a besoin d'être formaté correctement. Magento est l'un des plus grands sites de commerce électronique open source et est hautement évolutif et polyvalent - mais vous devez payer pour cela ou savoir comment le programmer vous-même. La raison pour laquelle j'ai fait ce programme est parce que je gère quelques magasins avec chacun ayant près de 5k produits et mon programme les met à jour en quelques minutes en utilisant un flux externe comme le vôtre. Où avez-vous obtenu ce XML? – ppumkin