【问题标题】:Bigcommerce Python API, how do I create a product with an image?Bigcommerce Python API,如何创建带有图像的产品?
【发布时间】:2017-06-19 14:20:59
【问题描述】:

如何使用 Bigcommerce 的 Python API 上传图片(来自网络)?

到目前为止我已经得到了这个:

custom = api.Products.create(name='Test', type='physical', price=8.33, categories=[85], availability='available', weight=0)

谢谢!我几乎尝试了所有方法!

【问题讨论】:

  • 也许可以查看this page。我认为您会创建一个产品图像对象,然后将其作为primary_image 添加到您的产品中

标签: python e-commerce bigcommerce


【解决方案1】:

这将在 BigCommerce 网站上创建产品。创建产品后,您可以通过输入以下行来创建图像。 image_file 标签应该是一个完全限定的 URL,指向 BigCommerce 网站可以访问的图像,可以在另一个网站或您自己的网络服务器上找到。

api.ProductImages.create(parentid=custom.id, image_file='http://www.evenmore.co.uk/images/emgrab_s.jpg', description='My image description')

【讨论】:

    猜你喜欢
    • 2014-02-25
    • 1970-01-01
    • 1970-01-01
    • 2015-08-15
    • 1970-01-01
    • 1970-01-01
    • 2015-05-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多