/**
  * Rewrite in order to clear configuration cache
  *
  * @return $this
  */
 public function afterDelete()
 {
     $this->_storeManager->reinitStores();
     parent::afterDelete();
     return $this;
 }
Exemple #2
0
 /**
  * Rewrite in order to clear configuration cache
  *
  * @return $this
  */
 public function afterDelete()
 {
     parent::afterDelete();
     $this->_configCacheType->clean();
     return $this;
 }
Exemple #3
0
 /**
  * After rule delete
  * Re-declared for dispatch tax_settings_change_after event
  *
  * @return $this
  */
 public function afterDelete()
 {
     $this->_eventManager->dispatch('tax_settings_change_after');
     return parent::afterDelete();
 }
Exemple #4
0
 /**
  * Rewrite in order to clear configuration cache
  *
  * @return $this
  */
 public function afterDelete()
 {
     parent::afterDelete();
     $this->_configCacheType->clean();
     if ($this->getId() === $this->getGroup()->getDefaultStoreId()) {
         $ids = $this->getGroup()->getStoreIds();
         if (!empty($ids) && count($ids) > 1) {
             unset($ids[$this->getId()]);
             $defaultId = current($ids);
         } else {
             $defaultId = null;
         }
         $this->getGroup()->setDefaultStoreId($defaultId);
         $this->getGroup()->save();
     }
     return $this;
 }
Exemple #5
0
 /**
  * @inheritdoc
  */
 public function afterDelete()
 {
     $result = parent::afterDelete();
     if ($this->getId() === $this->getWebsite()->getDefaultGroupId()) {
         $ids = $this->getWebsite()->getGroupIds();
         if (!empty($ids) && count($ids) > 1) {
             unset($ids[$this->getId()]);
             $defaultId = current($ids);
         } else {
             $defaultId = null;
         }
         $this->getWebsite()->setDefaultGroupId($defaultId);
         $this->getWebsite()->save();
     }
     return $result;
 }