WisQQ Posted December 28, 2023 Share Posted December 28, 2023 (edited) Hello, After shoppingcart module upgrade to 3.0.0 version, there is a bug which passes object to smarty compilation instead of array. Because of that site will break when trying to render cart widget. To fix this issue, you have to change object to array inside this function: /** * Provides an already presented object from the context if set. * If not, runs the presenter. * * @return array presented cart */ private function getPresentedCart() { /* * We will use the already presented cart in the first place. It should be already in the template. * Check FrontController::assignGeneralPurposeVariables for more information. * * If it's not, we will present the cart ourselves. There will always be a cart object * assigned in FrontController::init. */ if (!empty($this->context->smarty->getTemplateVars('cart'))) { return (array)$this->context->smarty->getTemplateVars('cart'); } else { return (new CartPresenter())->present($this->context->cart); } } $this->context->smarty->getTemplateVars('cart'); returns object instead of array, but functions should return array. Edited December 28, 2023 by WisQQ (see edit history) 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