I am trying to set products stock values from an external script with this code:
$product->setStockData(array(
'manage_stock' => 1, //'Use config settings' checkbox
'use_config_manage_stock' => 1, //'Use config settings' checkbox
'min_sale_qty'=>1, //Minimum Qty Allowed in Shopping Cart
'max_sale_qty'=>2, //Maximum Qty Allowed in Shopping Cart
'is_in_stock' => 1, //Stock Availability
'qty' => 999 //qty
)
);
After saving the product, whatever value I set, on the admin page I always see those values:
Other product data is saved correctly.
Magento version is 1.9.3.8.
What am I doing wrong?
