kierweb Posted March 4, 2021 Share Posted March 4, 2021 I built a payment module for Prestashop, and it was working fine in v1.7.6.x ... but since trying it in v1.7.7.7 I keep getting the following error when trying to Validate the order. Any ideas? PHP Fatal error: Uncaught PrestaShopBundle\Exception\NotImplementedException: Shop context types other than "single shop" are not supported Link to comment Share on other sites More sharing options...
DeParagon Posted April 6, 2021 Share Posted April 6, 2021 $shop = Context::getContext()->shop; if (!Validate::isLoadedObject($shop)) { $shop = new Shop((int) Configuration::get('PS_SHOP_DEFAULT')); } //Important to setContext Shop::setContext($shop::CONTEXT_SHOP, $shop->id); $this->context->shop = $shop; $this->context->cookie->id_shop = $shop->id; Just before calling $module->validateOrder() method, place the code above. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now