/** * After change Catalog Inventory Manage Stock value process * @return $this */ public function afterSave() { if ($this->isValueChanged()) { $this->_stockIndexerProcessor->markIndexerAsInvalid(); } return parent::afterSave(); }
/** * After change Catalog Inventory Backorders value process * * @return $this */ public function afterSave() { if ($this->isValueChanged() && ($this->getOldValue() == \Magento\CatalogInventory\Model\Stock::BACKORDERS_NO || $this->getValue() == \Magento\CatalogInventory\Model\Stock::BACKORDERS_NO)) { $this->_stockIndexerProcessor->markIndexerAsInvalid(); } return parent::afterSave(); }