Magento最小订货量api

时间:2016-08-24 19:45:42

标签: php api magento soap magento-1.4

我想通过SOAP V1 API在Magento 1.4 Shop中设置最小订单数量。 我用这个电话:

$proxy->call($session, 'product_stock.update', 
 array($product_id, array('min_sale_qty' => 10,
 'use_config_min_sale_qty' => 0), 'default'));

但它不起作用,最小订单数量不变。当我在后端设置时,它工作正常。还有其他API调用,如product.update工作正常。

1 个答案:

答案 0 :(得分:2)

我只是快速浏览一下,但看起来使用库存商品API更改public class UserDeserializer extends JsonDeserializer<User> { @Override public User deserialize(JsonParser parser, DeserializationContext context) throws IOException, JsonProcessingException { JsonNode node = parser.getCodec().readTree(parser); int userId = (Integer) ((IntNode) node.get("userID")).numberValue(); return new User(userId); // Placeholder User object containing only the user ID, needs to be replaced in business logic } } 属性的能力是only introduced in Magento 1.9

不幸的是,你在{Magento 1.4中看到have only the following options to update

  • wget -p -k http://the-site-you-want.com/fileName.html
  • min_sale_qty
  • qty
  • is_in_stock

当然,如果你愿意,你可以重写和扩展这个类,并添加Magento 1.9的功能, 允许你使用SOAP API更新manage_stock,但是不是核心代码本身(在1.4中)。

相关问题