2011-05-03 3 views
0

magento에서 제품의 xml 데이터 피드를 가져 오려고합니다. 가져 오기를 시도해보십시오. 그러나 MSOffice-xml 또는 cvs 파일에 있어야 성공적으로 가져올 수 있습니다. 나는 cvs에 xml 파일을 파싱하려고 시도했지만 xml 파일의 섹션만을 구문 분석 할 수있었습니다. 나는 모든 것을 분석 할 수 있었지만 영양분 섹션 만 분석 할 수있었습니다. 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

는 –

답변

0

Magento로 가져 오기는 매우 까다로운 작업입니다. Magento로 가져 오는 데는 거의 100 % 완벽해야합니다. 생성 및 관리가 더 쉽기 때문에 XML을 사용하는 것이 좋습니다. CSV는 오래되었고 따옴표와 끝없는 문제를 가지고 있습니다.

나는이 개인 프로젝트에서 일하고 있지만 내 프로젝트를 이동하고 새로운 사이트를 만드는 중간에 있습니다.

관심이 있으시면 여기를 클릭하십시오.

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

동영상 일부 지역에서는 매우 불안정 사이드 라인에서 개발의 많은 년에도 불구하고 이었소에게 소프트웨어를 도울 수있는 몇 가지 튜토리얼이 있습니다.

나는 간단한 해결책으로 당신을 여기에서 돕고 싶다. 그러나 그것의 다만 아주 복잡하고 이렇게 많은 것이 잘못된다.

+0

를 사용하는 코드이 더 적합 할 것이다 다른 전자 상거래 플랫폼이 있습니까보기 ..하지만 그것을 설정하는 것은 또 다른 고통 -

는 이제 일 젠토는 API를 사용? 나는 아직 Magento에 전념하지 않았다. – user736576

+0

각 플랫폼에서 올바른 형식으로 포맷해야하므로 데이터를 가져 오는 데 문제가 발생합니다. Magento는 가장 큰 오픈 소스 전자 상거래 사이트 중 하나이며 확장 성이 뛰어나고 다용도 성이 뛰어납니다. 그러나이를 지불하거나 자신의 프로그램 방법을 알아야합니다. 내가이 프로그램을 만든 이유는 내가 5k 제품에 가까운 제품을 가지고있는 몇 개의 상점을 관리하고 내 프로그램이 너와 같은 외부 피드를 사용하여 몇 분 안에 업데이트하기 때문이다. 그 XML은 어디에서 가져 왔습니까? – ppumkin