resourceConfig = $resourceConfig; parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data); } /** * Prepare and store cron settings after save * * @return $this */ public function afterSave() { if ($this->isValueChanged()) { $this->_resetNotificationFlag(Config::XML_PATH_TAX_NOTIFICATION_IGNORE_DISCOUNT); $this->_resetNotificationFlag(Config::XML_PATH_TAX_NOTIFICATION_IGNORE_PRICE_DISPLAY); $this->_resetNotificationFlag(Config::XML_PATH_TAX_NOTIFICATION_IGNORE_APPLY_DISCOUNT); } return parent::afterSave(); } /** * Reset flag for showing tax notifications * * @param string $path * @return \Magento\Tax\Model\Config\Notification */ protected function _resetNotificationFlag($path) { $this->resourceConfig->saveConfig($path, 0, ScopeConfigInterface::SCOPE_TYPE_DEFAULT, 0); return $this; } }