4

我正在magento中使用soap api构建一个新的第三方应用程序,它能够在移动设备上销售产品。但问题是我在增加产品列表时没有找到任何方法来显示缩小尺寸的图像。我正在使用 catalog_product_attribute_media.list 来查找图像 url,但该 url 是全尺寸和大图像。我无法使用肥皂 api 找到缩略图和 small_images 的 url。这是因为 magento 会自动生成它们。我不能使用大尺寸的图像,因为这个应用程序是在移动网络上使用的。有没有人可以告诉我如何解决这个小尺寸图像问题。或者告诉我使用magento的soap api使用这些缩略图的任何方法。如果您知道任何可以减少图像内存大小的动态图像尺寸减小方法,那么也请告诉我。

4

2 回答 2

1

试试这个模块,很好的处理图片和调整大小的方法,http://www.magentocommerce.com/magento-connect/cloud-zoom-4634.html

于 2012-08-18T16:31:07.320 回答
-2

这里是

允许您检索产品图像类型,包括标准图像、小图像、缩略图等。

SOAP API V1 请求:

$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires api authentification,
// then get a session token
$session = $client->login('apiUser', 'apiKey');

$result = $client->call($session, 'catalog_product_attribute_media.types', '4');
var_dump($result);

// If you don't need the session anymore
//$client->endSession($session);

回复:

array
  0 =>
    array
      'code' => string 'image' (length=5)
      'scope' => string 'store' (length=5)
  1 =>
    array
      'code' => string 'small_image' (length=11)
      'scope' => string 'store' (length=5)
  2 =>
    array
      'code' => string 'thumbnail' (length=9)
      'scope' => string 'store' (length=5)
于 2012-08-19T21:41:40.703 回答