This commit is contained in:
1 parent
858bb539c8
commit
d62e3da234
1 file changed
+2
-2
@@ -67,9 +67,9 @@ class AdminShop extends AdminTab
|
|||||||
|
|
||||||
public function postProcess()
|
public function postProcess()
|
||||||
{
|
{
|
||||||
if (Tools::isSubmit('delete'.$this->table) OR Tools::isSubmit('status') OR Tools::isSubmit('status'.$this->table))
|
if (Tools::isSubmit('delete'.$this->table) OR ((Tools::isSubmit('status') OR Tools::isSubmit('status'.$this->table)) && $this->loadObject()->active))
|
||||||
{
|
{
|
||||||
if(Shop::getTotalShops() == 1)
|
if (Shop::getTotalShops() == 1)
|
||||||
{
|
{
|
||||||
$this->_errors[] = Tools::displayError('You cannot delete or disable the last shop.');
|
$this->_errors[] = Tools::displayError('You cannot delete or disable the last shop.');
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in new issue
Block a user