When I enter a Minimum Quantity for the product (in the admin for the product), and press save, the number just defaults back to 0.

What would cause this?


The reason for the issue is that the module has not created two columns: bss_minimum_qty_configurable and use_config_bss_minimum_qty_configurable. 

Besides, we found that the code that renders the minimum qty for each product using the foreach save can cause your site to break when the number of products is large. So, it is necessary to optimize the collection filter and query to update the save configuration faster. 

To resolve the issue, please edit the file /app/code/local/Bss/MinimumQtyConfigurable/Model/System/Config/Backend/Minqty.php as below: 

$stockItemCol = Mage::getResourceModel('cataloginventory/stock_item_collection');

        $stockItemCol->addFieldToFilter('type_id', array('eq' => Bss_MinimumQtyConfigurable_Model_Observer::TYPE_CONFIGURABLE));

        $stockItemCol->addFieldToFilter('use_config_bss_minimum_qty_configurable', array('eq' => 1));

        $connection = Mage::getSingleton('core/resource')->getConnection('core_write');

        $listItemId = $stockItemCol->getAllIds();

        if (!empty($listItemId)) {

            $listItemIds = implode(",", $listItemId);

            $sql = "UPDATE cataloginventory_stock_item SET bss_minimum_qty_configurable = ".(string)$minQty." WHERE item_id IN (".$listItemIds."); ";



If you need any further assistance, please feel free to contact us. We'd be happy to support you!