Image 是否可以使用Magento Soap API V2链接到现有的产品映像?

Image 是否可以使用Magento Soap API V2链接到现有的产品映像?,image,api,magento,soap,Image,Api,Magento,Soap,我正在使用Magento提供班级注册。我正在使用SOAP API V2将类“克隆”到新的日期 我想重新使用现有的类映像,因为将同一映像重新上传数百次似乎很愚蠢 是否可以通过API V2链接到现有图像 catalogProductAttributeMediaCreate()似乎不想用我的尝试来实现它。 catalogProductAttributeMediaUpdate()也不起作用,因为尚未为该产品创建映像。试试这个 $proxy = new SoapClient('http://magento

我正在使用Magento提供班级注册。我正在使用SOAP API V2将类“克隆”到新的日期

我想重新使用现有的类映像,因为将同一映像重新上传数百次似乎很愚蠢

是否可以通过API V2链接到现有图像

catalogProductAttributeMediaCreate()似乎不想用我的尝试来实现它。 catalogProductAttributeMediaUpdate()也不起作用,因为尚未为该产品创建映像。

试试这个

$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy->login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy->catalogProductAttributeMediaInfo($sessionId, '2', '/b/l/blackberry8100_2.jpg');
var_dump($result);
答复如下:

array
  'file' => string '/b/l/blackberry8100_2.jpg' (length=25)
  'label' => string '' (length=0)
  'position' => string '1' (length=1)
  'exclude' => string '0' (length=1)
  'url' => string 'http://magentohost/media/catalog/product/b/l/blackberry8100_2.jpg' (length=71)
  'types' =>
    array
      0 => string 'image' (length=5)
      1 => string 'small_image' (length=11)
      2 => string 'thumbnail' (length=9)