Skip to content

Commit

Permalink
MPGS-610 [Simplify] [PrestaShop] Module installation issue | Fails in…
Browse files Browse the repository at this point in the history
… 1st attempt but installing successfully in 2nd attempt
  • Loading branch information
riversy committed Dec 13, 2021
1 parent 792c7b8 commit 6d2b42f
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 6d2b42f

Please sign in to comment.