Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Qty for Item’s Status to Become Out of Stock - Not possible to set value less then zero since 1.7.0.0
 
fullycoolly
Jr. Member
 
Total Posts:  4
Joined:  2011-10-10
 

Hello,

I work with different Magento versions. I noticed that in versions 1.7.0.0 - 1.7.0.2 it is not possible to set value below zero for “Qty for Item’s Status to Become Out of Stock”.

This option is under: Magento Admin Panel -> System -> Configuration -> Catalog -> Inventory -> Product Stock Options.

Personally, I set this value to below zero directly in database. However, I’m curious why is it no longer available to set value below zero for this option? Is it a bug or a feature? grin

Many thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
fullycoolly
Jr. Member
 
Total Posts:  4
Joined:  2011-10-10
 

Thread no longer actual. I posted this issue on bug tracker and it was confirmed… Glad it will be fixed in one of next versions.

 
Magento Community Magento Community
Magento Community
Magento Community
 
choussamaster
Sr. Member
 
Total Posts:  93
Joined:  2009-07-14
 

Hello
same probleme I need this option did you found a solution?

 
Magento Community Magento Community
Magento Community
Magento Community
 
kalenjordan
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2011-10-31
Pasadena, CA
 

It sounds like what @fullycoolly was saying was that you can actually still set this value directly in the database, but that if you try to set it in the Admin, it actually forces the value to zero, if you try to set it to something lower than zero - say “-1” for example.

But if you want to modify it directly in the DB, it’s in cataloginventory/item_options/min_qty in core_config_data

 
Magento Community Magento Community
Magento Community
Magento Community
 
fullycoolly
Jr. Member
 
Total Posts:  4
Joined:  2011-10-10
 

1. You can wait for new Magento release - most likely this fix will be included.

2. If you can’t wait and you know what you are doing - make database backup and then run the following SQL statement from your myphpadmin or using SSH client, etc.:

UPDATE core_config_data
SET value = ‘-100’
WHERE path = ‘cataloginventory/item_options/min_qty’

Replace ‘-100’ number to what you wish.
If you are using prefix for tables - don’t forget to add it to table name.
You can make the database backup from Admin Panel.

Hope this helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
choussamaster
Sr. Member
 
Total Posts:  93
Joined:  2009-07-14
 

this is the solution for people who need it I hope it will be fixed in the next version
app\code\core\Mage\Adminhtml\controllers\Catalog\ProductController.php line 679
change
if (isset($stockData[’min_qty’]) && (int)$stockData[’min_qty’] < 0) {
$stockData[’min_qty’] = 0;
by
if (isset($stockData[’min_qty’]) && (int)$stockData[’min_qty’] < 0) {
$stockData[’min_qty’] = (int)$stockData[’min_qty’];

 
Magento Community Magento Community
Magento Community
Magento Community
 
kyle1599
Jr. Member
 
Total Posts:  26
Joined:  2011-01-20
 
choussamaster - 03 February 2013 01:43 AM

this is the solution for people who need it I hope it will be fixed in the next version
app\code\core\Mage\Adminhtml\controllers\Catalog\ProductController.php line 679
change
if (isset($stockData[’min_qty’]) && (int)$stockData[’min_qty’] < 0) {
$stockData[’min_qty’] = 0;
by
if (isset($stockData[’min_qty’]) && (int)$stockData[’min_qty’] < 0) {
$stockData[’min_qty’] = (int)$stockData[’min_qty’];

Seems to work, however throws system log errors:

2013-05-16T21:48:05+00:00 ERR (3): Notice: Use of undefined constant â€™min_qty’ assumed '’min_qty’'
 
Magento Community Magento Community
Magento Community
Magento Community
 
ggerman
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2009-03-27
 

Thank you for information

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top