【问题标题】:Amazon xml feed with mws api using PHP Client Library使用 PHP 客户端库的带有 mws api 的 Amazon xml 提要
【发布时间】:2017-06-19 19:03:18
【问题描述】:

您好,我是 Amazon API 的新手, 我想使用我自己的 HTML 应用程序中的 MWS API 产品提要列出我的产品。我已经从这里下载了开发人员资源

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

1.Edited ".config.inc.php" from \src\MarketplaceWebService\Samples

2.更改AWS_ACCESS_KEY_ID、AWS_SECRET_ACCESS_KEY和MERCHANT_ID

3.编辑 SubmitFeedSample.php 文件并按照说明相应地删除了 cmets 并将方法更改为 _POST_PRODUCT_DATA_

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.在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.在 $feed 变量的 "SubmitFeedSample.php" 中添加此 XML 代码(第 99 行)

7.在我的hostgator服务器上上传“PHP Client Library”的所有文件

8.在firefox中浏览到文件

9.在 Firefox 中,它在服务响应中显示 “FeedProcessingStatus SUBMITTED”

但在完成所有这些操作后,我无法在卖家中心账户的“管理库存”中看到产品。

最后一件事是如何在 SubmitFeedSample.php 中同时使用 "_POST_PRODUCT_IMAGE_DATA_" 及其 xml(如 XML 指南中所示)与 "_POST_PRODUCT_DATA_"强>

请帮忙,因为它们不是简单的教程或视频来演示确切的过程。

【问题讨论】:

标签: php xml api amazon-web-services amazon-mws


【解决方案1】:

你需要做两件事:

  1. 检查您提交的 Feed 是否真的得到了成功处理
  2. 至少,您需要发送 3 个提要:产品数据、定价和库存数量。处理完这三个 Feed 后,这些商品将显示在卖家中心。更多详情:Correct Amazon MWS flow for item with existing ASIN

【讨论】:

    【解决方案2】:

    我也是亚马逊 API 的新手,并且使用以下模式。 而且它工作正常。

    <?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>
    

    【讨论】:

    • 但是您的产品是添加到您的库存中而不是作为草稿吗?
    • 是的,添加到库存中。
    • 我使用几乎相同的 XML 文件。但是我的产品总是被保存为草稿。你知道可能是什么问题吗?
    • 几年前我做过这个,最近无法访问那个系统。但我确实遇到了这个问题。它完全是在添加一条记录,经过一些修复后它开始工作。您是否有足够的权限来添加记录?
    • 您正在使用暂存器?
    猜你喜欢
    • 2015-10-07
    • 1970-01-01
    • 2015-08-17
    • 1970-01-01
    • 2020-02-04
    • 1970-01-01
    • 1970-01-01
    • 2013-11-21
    • 2017-03-25
    相关资源
    最近更新 更多