程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长


+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

亚马逊MWS开发--修改商品的价格、库存、图片

发布于2021-03-13 18:53     阅读(1186)     评论(0)     点赞(1)     收藏(4)


1、引言

这篇文章主要介绍产品的的一些基本属性修改,比如商品的主图,价格,库存等

2、思路

商品的基本属性修改比上传商品简单,参数也不多,根据相对应的xsd来构建我们的参数。
价格xsd:https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_1_9/Price.xsd
库存的xsd:https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_1_9/Inventory.xsd
图片的xsd:https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_1_9/ProductImage.xsd
在看对应的FeedType

FeedType类型
POST_INVENTORY_AVAILABILITY_DATA库存
POST_PRODUCT_PRICING_DATA价格
POST_PRODUCT_IMAGE_DATA图片

3、实现

直接看对应的xml
a、库存的xml

<?xml version="1.0" encoding="utf-8" ?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
    <Header>
        <DocumentVersion>1.01</DocumentVersion>
        <MerchantIdentifier>A1AM78C64UM0Y8</MerchantIdentifier>
    </Header>
    <MessageType>Inventory</MessageType>
    <Message>
        <MessageID>1</MessageID>
        <OperationType>Update</OperationType>
        <Inventory>
            <SKU>happy</SKU>
            <Quantity>8</Quantity>
        </Inventory>
    </Message>
</AmazonEnvelope>

b、价格的xml

<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
    <Header>
        <DocumentVersion>1.01</DocumentVersion>
        <MerchantIdentifier>A1AM78C64UM0Y8</MerchantIdentifier>
    </Header>
    <MessageType>Price</MessageType>
    <Message>
        <MessageID>1</MessageID>
        <Price>
            <SKU>happy</SKU>
            <StandardPrice currency="CAD">103.36</StandardPrice>
            <!-- 特卖价格-->
<!--            <Sale>-->
<!--                <StartDate>2020-03-01T00:00:00Z</StartDate>-->
<!--                <EndDate>2020-03-11T00:00:00Z</EndDate>-->
<!--                <SalePrice currency="MXN">28.38</SalePrice>-->
<!--            </Sale>-->
        </Price>
    </Message>
</AmazonEnvelope>

c、图片的xml

<?xml version="1.0" encoding="utf-8" ?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
    <Header>
        <DocumentVersion>1.01</DocumentVersion>
        <MerchantIdentifier>A1AM78C64UM0Y8</MerchantIdentifier>
    </Header>
    <MessageType>ProductImage</MessageType>
    <Message>
        <MessageID>1</MessageID>
        <OperationType>Update</OperationType>
        <ProductImage>
            <SKU>happy</SKU>
            <ImageType>Main</ImageType>
            <!-- 用http开头的图片地址,不要用https开头的-->
            <ImageLocation>图片地址</ImageLocation>
        </ProductImage>
    </Message>
</AmazonEnvelope>

4、总结

商品的属性修改总体来说比较简单,没有什么特别的地方,图片地址建议用海外的运营商,这样亚马逊下载图片也更速度
下一篇主要介绍商品的变体,也就是多规格属性

原文链接:https://blog.csdn.net/yucdsn/article/details/114679278




所属网站分类: 技术文章 > 博客

作者:大哥你来啦

链接:http://www.qianduanheidong.com/blog/article/35827/7bc487d70be1238fb430/

来源:前端黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

1 0
收藏该文
已收藏

评论内容:(最多支持255个字符)