示例#1
0
 /**
  * After change Catalog Inventory Manage Stock value process
  * @return $this
  */
 public function afterSave()
 {
     if ($this->isValueChanged()) {
         $this->_stockIndexerProcessor->markIndexerAsInvalid();
     }
     return parent::afterSave();
 }
示例#2
0
 /**
  * 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();
 }