简体   繁体   English

使用PHP客户端库的MWS API的Amazon XML Feed

[英]Amazon xml feed with mws api using PHP Client Library

Hello I am new to Amazon API, I want to list my products using MWS API product feed from my own HTML application.I have downloaded Developer Resources from here 您好,我是Amazon API的新手,我想使用自己的HTML应用程序中的MWS API产品提要列出我的产品。我已经从此处下载了开发人员资源

https://developer.amazonservices.com/api.html?group=bde&section=feeds&version=latest https://developer.amazonservices.com/api.html?group=bde&section=feeds&version=latest

1.Edited ".config.inc.php" from \\src\\MarketplaceWebService\\Samples 1.从\\ src \\ MarketplaceWebService \\ Samples中编辑“ .config.inc.php”

2.Changed AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY and MERCHANT_ID 2.更改了AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY和MERCHANT_ID

3.Edited SubmitFeedSample.php file and followed instructions and removed comments accordingly and changed method to _POST_PRODUCT_DATA_ 3.编辑了SubmitFeedSample.php文件并按照说明进行操作,并相应地删除了注释,并将方法更改为_POST_PRODUCT_DATA_

4.Followed the tutorial present in "Selling on Amazon Guide to XML" to Generate this XML 4.按照“在亚马逊上销售XML指南”中提供的教程生成此XML

<?xml version="1.0" ?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>mymerchantid</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<PurgeAndReplace>true</PurgeAndReplace>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>720656549</SKU>
<DescriptionData>
<Title>GIRLS S/S PRINTED COTTON AND PLITED FROCK WITH CONTRAST FRONT BELT AND BOW</Title>
<Brand>mybrand</Brand>
<Description>The Girls Racer Back Neck Tie up Tunic from Oye is the perfect choice to dress your little girl while heading out for the day.It is made of soft and pliable material, which ensures to keep her fresh and comfortable throughout the day.Pair this dress with cute ballerinas and matching hair accessories to complete the casual look.</Description>
<BulletPoint>Made in India</BulletPoint>
<BulletPoint>500 thread count</BulletPoint>
<BulletPoint>plain weave (percale)</BulletPoint>
<BulletPoint>100% Egyptian cotton</BulletPoint>
<Manufacturer>mybrand</Manufacturer>
<SearchTerms>clothes</SearchTerms>
<SearchTerms>baby girl</SearchTerms>
<ItemType>Girls</ItemType>
<IsGiftWrapAvailable>false</IsGiftWrapAvailable>
<IsGiftMessageAvailable>false</IsGiftMessageAvailable>
</DescriptionData>
<ProductData>
<Home>
<Parentage>variation-parent</Parentage>
<VariationData>
<VariationTheme>Size-Color</VariationTheme>
</VariationData>
<Material>cotton</Material>
<ThreadCount>500</ThreadCount>
</Home>
</ProductData>
</Product>
</Message>
<Message>
</AmazonEnvelope>

5.Tested this XML in MWS Scratchpad and the result is 5.在MWS Scratchpad中测试了此XML,结果是

 Response (200)
<?xml version="1.0"?>
<SubmitFeedResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">
<SubmitFeedResult>
  <FeedSubmissionInfo>
    <FeedSubmissionId>50081******</FeedSubmissionId>
    <FeedType>_POST_PRODUCT_DATA_</FeedType>
    <SubmittedDate>*********</SubmittedDate>
    <FeedProcessingStatus>_SUBMITTED_</FeedProcessingStatus>
  </FeedSubmissionInfo>
</SubmitFeedResult>
<ResponseMetadata>
  <RequestId>*****************</RequestId>
</ResponseMetadata>
</SubmitFeedResponse>

6.Added this XML code in "SubmitFeedSample.php" on $feed variable(line 99) 6.将此XML代码添加到$ feed变量的“ SubmitFeedSample.php”中 (第99行)

7.Uploaded all files of "PHP Client Library" on my hostgator server 7.在我的hostgator服务器上上传了“ PHP Client Library”的所有文件

8.Browsed to the file in firefox 8,浏览到Firefox中的文件

9.In firefox it shows "FeedProcessingStatus SUBMITTED" in service response. 9.在firefox中,服务响应中显示“ FeedProcessingStatus SUBMITTED”

But after doing all this I am unable to see product in my "Manage Inventory" on seller central account. 但是完成所有这些操作后,我无法在卖方中央帐户的“管理库存”中看到产品。

and last thing how to use "_POST_PRODUCT_IMAGE_DATA_" and its xml(as shown in XML guide) in SubmitFeedSample.php simultaneously with "_POST_PRODUCT_DATA_" 最后一件事是如何在SubmitFeedSample.php中同时使用“ _POST_PRODUCT_IMAGE_DATA_”及其xml(如XML指南所示)和“ _POST_PRODUCT_DATA_”

Please help as their are no simple tutorials or videos to demonstrate the exact process. 请帮助,因为它们不是简单的教程或视频来演示确切的过程。

You need to do two things: 您需要做两件事:

  1. Check if the feeds you submitted actually get processed successfully 检查您提交的提要是否真的得到成功处理
  2. As a minimum, you need to send 3 feeds: product data, pricing and stock quantities. 至少,您需要发送3个Feed:产品数据,价格和库存数量。 After those three feeds are processed, the items will show up in Seller Central. 在处理完这三个提要之后,这些项目将显示在卖方中心中。 More details here: Correct Amazon MWS flow for item with existing ASIN 此处更多详细信息: 为具有现有ASIN的商品更正Amazon MWS流

I m also new to amazon API and using the following schema. 我还是Amazon API的新手,并使用以下架构。 And It's working fine. 而且工作正常。

<?xml version="1.0" encoding="iso-8859-1"?>
        <AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
        <Header>
        <DocumentVersion>1.01</DocumentVersion>
        <MerchantIdentifier>YOUR_MERCHANT_ID</MerchantIdentifier>
        </Header>
        <MessageType>Product</MessageType>
        <PurgeAndReplace>false</PurgeAndReplace><Message>
                <MessageID>1</MessageID>
                <OperationType>Update</OperationType>
                <Product>
                <SKU>25075-9x12</SKU>
                <StandardProductID>
                <Type>ASIN</Type>
                <Value>B01MCR4YC5</Value>
                </StandardProductID>
                <ProductTaxCode>A_GEN_NOTAX</ProductTaxCode>
                <DescriptionData>
                <Title>Anam Black Large Rug</Title>
                <Brand>Alliyah Rugs</Brand>
                <Description>
The Alliyah Collection offers high quality, value and integrity that seems to been lost in recent times by most manufactures. The Anam Black Large Rug is made of first grade New-Zealand blend wool which is Hand washed, Hand carved and Hand finished. The entire collection is 100% Handmade.</Description>
                <ItemType>New</ItemType>
                </DescriptionData>
                </Product>
                </Message></AmazonEnvelope>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM