Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

[-] BO : Fixed bugs in Customer notifications #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions mailalerts.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,12 @@ protected function postProcess()

if (Tools::isSubmit('submitMailAlert'))
{
if (!Configuration::updateValue('MA_CUSTOMER_QTY', (int)Tools::getValue('MA_CUSTOMER_QTY')))
if (
!Configuration::updateValue('MA_CUSTOMER_QTY', (int)Tools::getValue('MA_CUSTOMER_QTY')) ||
!Configuration::updateValue('MA_ORDER_EDIT', (int)Tools::getValue('MA_ORDER_EDIT'))
) {
$errors[] = $this->l('Cannot update settings');
}
}
else if (Tools::isSubmit('submitMAMerchant'))
{
Expand Down Expand Up @@ -844,8 +848,13 @@ public function hookActionOrderReturn($params)
*/
public function hookActionOrderEdited($params)
{
if (!$this->order_edited || empty($this->order_edited))
if (
!$this->order_edited ||
empty($this->order_edited) ||
!Configuration::get('MA_ORDER_EDIT')
) {
return;
}

$order = $params['order'];

Expand Down