简体   繁体   English

Magento(SOAP)API catalog_product_attribute_media.list返回storeView

[英]Magento (SOAP) API catalog_product_attribute_media.list return storeView

I'm using Magento 1.9 SOAP API to manage products with our PIM . 我正在使用Magento 1.9 SOAP API通过我们的PIM管理产品。 We're using Magento's multi-store feature and some products are available on multiple stores but with different images. 我们正在使用Magento的多商店功能,有些产品可在多个商店中使用,但具有不同的图像。

Is there a way to populate the store views, which are assigned to the images inside the API response? 有没有办法填充商店视图,这些视图分配给API响应中的图像?

The default response from catalog_product_attribute_media.list according to the Magento 1.x SOAP API documentation is: 根据Magento 1.x SOAP API文档catalog_product_attribute_media.list的默认响应为:

  • file 文件
  • label 标签
  • position 位置
  • exclude 排除
  • url 网址
  • types 类型

Maybe I'm going to hack Mage_Catalog_Model_Product_Attribute_Media_Api ... but I hope there is a better way. 也许我要破解Mage_Catalog_Model_Product_Attribute_Media_Api ...但我希望有更好的方法。

If store code is not specified explicitly during catalog_product_attribute_media.list call, the result will contain only images assigned to the default store view (those images which are set in the admin panel, when no custom store view is selected in "Choose Store View" dropdown). 如果在catalog_product_attribute_media.list调用期间未明确指定商店代码,则结果将仅包含分配给默认商店视图的图像(当在“选择商店视图”下拉列表中未选择自定义商店视图时,这些图像在管理面板中设置) )。

To get images assigned in specific store view, please use optional storeView parameter of catalog_product_attribute_media.list . 要获取在特定商店视图中分配的图像,请使用catalog_product_attribute_media.list可选storeView参数。 Thus store view will be known for all retrieved images. 因此,对于所有检索到的图像,商店视图都是已知的。 No need to hack Mage_Catalog_Model_Product_Attribute_Media_Api . 无需破解Mage_Catalog_Model_Product_Attribute_Media_Api

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

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