Skip to content

Commit

Permalink
Merge branch 'MPGS-610' into 'master'
Browse files Browse the repository at this point in the history
MPGS-610 [Simplify] [PrestaShop] Module installation issue | Fails in 1st...

See merge request mpgs/simplify-prestashop!13
  • Loading branch information
OnTapKristjan committed Dec 20, 2021
2 parents 792c7b8 + 6d2b42f commit 97f865b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
node_modules/
errorShots/
config.xml
/prestashop-simplifycommerce.zip
/simplifycommerce.zip
*.less
*.css.map
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
all :
git archive HEAD --prefix=simplifycommerce/ -o ./prestashop-simplifycommerce.zip &&\
echo "\nCreated prestashop-simplifycommerce.zip\n"
git archive HEAD --prefix=simplifycommerce/ -o ./simplifycommerce.zip &&\
echo "\nCreated simplifycommerce.zip\n"
10 changes: 8 additions & 2 deletions simplifycommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@ public function hookDisplayAdminOrderLeft($params)
return $this->display(__FILE__, 'views/templates/hook/order_actions.tpl');
}

/**
* @return bool
*
* @throws PrestaShopDatabaseException
* @throws PrestaShopException
*/
public function installOrderState()
{
if (!Configuration::get('SIMPLIFY_OS_AUTHORIZED')
Expand All @@ -332,9 +338,9 @@ public function installOrderState()
$destination = _PS_ROOT_DIR_.'/img/os/'.(int)$order_state->id.'.gif';
copy($source, $destination);
}

Configuration::updateValue('SIMPLIFY_OS_AUTHORIZED', (int)$order_state->id);
return Configuration::updateValue('SIMPLIFY_OS_AUTHORIZED', (int)$order_state->id);
}
return true;
}

/**
Expand Down

0 comments on commit 97f865b

Please sign in to comment.