Magento – Display Out of Stock Configuration not working in magento1.9

configurationmagento-1.9out-of-stockrest

I have a configurable product with 3 simple products associated to it that were added via REST.

I have set the "Display Out of Stock Products" option in System->Configuration->Inventory to "Yes"

Configurable Product

  • Manage Stock => Yes; Use Config Settings
  • Stock Availability => In Stock

Simple Product 1

  • Manage Stock => Yes; Use Config Settings
  • Stock Availability => In Stock
  • Quantity => 5

Simple Product 2

  • Manage Stock => Yes; Use Config Settings
  • Stock Availability => In Stock
  • Quantity => 1

Simple Product 3

  • Manage Stock => Yes; Use Config Settings
  • Stock Availability => Out of Stock
  • Quantity => 0

Why won't Product 3 show on my website (front-end)? It displays when I set the product to "In Stock".

EDIT: So I got it working in a roundabout way. I sent the URL twice and it now displays as "backordered". Full disclosure – I am using someone else's code and trying to make this work. Here is the important part of the URL (minus my website info)

  • https://****/index.php/****/****/push?&prodcode=29543&sku=E29543&name=Ethyl%206-(trifluoromethyl)pyridazine-3-carboxylate&name1=Ethyl%206-(trifluoromethyl)pyridazine-3-carboxylate&name2=&inchi=&inchi_key=&formula=C8H7F3N2O2&mass=220.148&cas=1192155-06-8&purity=&mdl=&msds=&total_stock=5.1g&images[0]=29543.png&categories[0]=&categories[1]=&categories[2]=&categories[4]=&categories[5]=&categories[6]=&options[1][price]=940&options[1][code]=E29543G1&options[1][unit]=G1&options[1][size]=1g&options[1][instock]=yes&options[1][stock]=5&options[2][price]=2810&options[2][code]=E29543G5&options[2][unit]=G5&options[2][size]=5g&options[2][instock]=yes&options[2][stock]=1&options[3][price]=4610&options[3][code]=E29543G10&options[3][unit]=G10&options[3][size]=10g&options[3][instock]=yes&options[3][stock]=0&options[4][price]=&options[4][code]=&options[4][unit]=&options[4][size]=&options[4][instock]=yes&options[4][stock]=&options[5][price]=&options[5][code]=&options[5][unit]=&options[5][size]=&options[5][instock]=yes&options[5][stock]=&options[6][price]=&options[6][code]=&options[6][unit]=&options[6][size]=&options[6][instock]=yes&options[6][stock]=%3F

Why would this work the 2nd time but not the first??? Not sure if it's relevant, but it would seem the previous developer created a custom data controller.

Best Answer

I have set the "Display Out of Stock Products" option in System->Configuration->Inventory to "Yes"

Please refresh the indexes/cache in the admin.

Then, when putting up the product via REST, try the following:

"stock_data" : { "qty" : 0, "is_in_stock" : 1, "use_config_manage_stock" : 1, }

Related Topic