verajorge Posted July 6, 2017 Share Posted July 6, 2017 (edited) well, I was trying to add a menu to my main page without success for days, then the same with a shopping cart. the worse happened and when I change something, this happened: Whoops, looks like something went wrong. 1/1 Exception in CartPresenter.php line 281:CartPresenter can only present instance of Cart in CartPresenter.php line 281 at CartPresenter->present(null) in ps_shoppingcart.php line 85 at Ps_Shoppingcart->getWidgetVariables('displayAdminAfterHeader', array('smarty' => object(Smarty_Internal_Template), 'cookie' => object(Cookie), 'cart' => null)) in ps_shoppingcart.php line 97 at Ps_Shoppingcart->renderWidget('displayAdminAfterHeader', array('smarty' => object(Smarty_Internal_Template), 'cookie' => object(Cookie), 'cart' => null)) in Hook.php line 900 at HookCore::coreRenderWidget(object(Ps_Shoppingcart), 'displayAdminAfterHeader', array('smarty' => object(Smarty_Internal_Template), 'cookie' => object(Cookie), 'cart' => null)) in Hook.php line 861 at HookCore::exec('displayAdminAfterHeader', array('smarty' => object(Smarty_Internal_Template), 'cookie' => object(Cookie), 'cart' => null), null) in smarty.config.inc.php line 168 at smartyHook(array('h' => 'displayAdminAfterHeader'), object(Smarty_Internal_Template)) in SmartyLazyRegister.php line 83 at SmartyLazyRegister->__call('smartyHook', array(array('h' => 'displayAdminAfterHeader'), object(Smarty_Internal_Template))) in smarty_internal_templatebase.php(157) : eval()'d code line 545 at content_595eaf8c74e569_46984037(object(Smarty_Internal_Template)) in smarty_internal_templatebase.php line 188 at Smarty_Internal_TemplateBase->fetch('header.tpl') in AdminController.php line 1813 at AdminControllerCore->display() in Controller.php line 225 at ControllerCore->run() in Dispatcher.php line 369 at DispatcherCore->dispatch() in index.php line 95 not a programmer....or even close to it...can you please help me to have access to my page again? Weird is that the page itself is still online: www.madewithamore.com appreciate the help!! Edited July 6, 2017 by verajorge (see edit history) Link to comment Share on other sites More sharing options...
verajorge Posted July 7, 2017 Author Share Posted July 7, 2017 anyone, help, advise...PLEASE 1 Link to comment Share on other sites More sharing options...
naix Posted August 26, 2017 Share Posted August 26, 2017 please i have the same error, you fixed? 1 1 Link to comment Share on other sites More sharing options...
oksimpl Posted September 3, 2017 Share Posted September 3, 2017 please i have the same error, you fixed? Hi. Fixed it? I have the same problem 1 Link to comment Share on other sites More sharing options...
selectshop.at Posted September 3, 2017 Share Posted September 3, 2017 Hi. Fixed it? I have the same problem Have you done a back-up of your FTP/scripts before you changed something, or renamed the original before ? Revert to original scriptings, this means: all changes you have done on scripts you should undo. 1 Link to comment Share on other sites More sharing options...
modehome Posted June 18, 2018 Share Posted June 18, 2018 Hello. Fixed it? I have the same problem Link to comment Share on other sites More sharing options...
Silviu Posted July 11, 2018 Share Posted July 11, 2018 On 07.07.2017 at 12:50 AM, verajorge said: Exception in CartPresenter.php line 281:CartPresenter can only present instance of Cart in CartPresenter.php line 281 at CartPresenter->present(null) in ps_shoppingcart.php line 85 at Ps_Shoppingcart->getWidgetVariables('displayAdminAfterHeader', array('smarty' => object(Smarty_Internal_Template), 'cookie' => object(Cookie), 'cart' => null)) in ps_shoppingcart.php line 97 at Ps_Shoppingcart->renderWidget('displayAdminAfterHeader', array('smarty' => object(Smarty_Internal_Template), 'cookie' => object(Cookie), 'cart' => null)) in Hook.php line 900 at HookCore::coreRenderWidget(object(Ps_Shoppingcart), 'displayAdminAfterHeader', array('smarty' => object(Smarty_Internal_Template), 'cookie' => object(Cookie), 'cart' => null)) in Hook.php line 861 at HookCore::exec('displayAdminAfterHeader', array('smarty' => object(Smarty_Internal_Template), 'cookie' => object(Cookie), 'cart' => null), null) in smarty.config.inc.php line 168 at smartyHook(array('h' => 'displayAdminAfterHeader'), object(Smarty_Internal_Template)) in SmartyLazyRegister.php line 83 at SmartyLazyRegister->__call('smartyHook', array(array('h' => 'displayAdminAfterHeader'), object(Smarty_Internal_Template))) in smarty_internal_templatebase.php(157) : eval()'d code line 545 at content_595eaf8c74e569_46984037(object(Smarty_Internal_Template)) in smarty_internal_templatebase.php line 188 at Smarty_Internal_TemplateBase->fetch('header.tpl') in AdminController.php line 1813 at AdminControllerCore->display() in Controller.php line 225 at ControllerCore->run() in Dispatcher.php line 369 at DispatcherCore->dispatch() in index.php line 95 Hello, I had the same problem. I my case there was an conflict with the shopping cart module. To access again the admin page need to rename temporary the folder ps_shoppingcart that is in public_html/modules (from cpanel). It`s important to rename this folder as "ps_shoppingcart_backup" because then you have to put it back. For the moment with this resolution you can access the backoffice and make the necessary changes. Link to comment Share on other sites More sharing options...
mma87 Posted April 1, 2021 Share Posted April 1, 2021 Hello, I fix this issue deleting from the database all hooks of the cart module in ps_hook_module table. you can see the module id searching ps_hook_module table the ps_shoppingcart BACKUP FIRST your database and if you are not confident with prestashop database don't delete anythings Link to comment Share on other sites More sharing options...
bellight Posted January 27, 2022 Share Posted January 27, 2022 in src/Adapter/Cart/CartPresenter.php (line 272) CartPresenter->present(null)in modules/ps_shoppingcart/ps_shoppingcart.php (line 96) Ps_Shoppingcart->getWidgetVariables('displayAdminAfterHeader', array('smarty' => object(Smarty_Internal_Template), 'cookie' => object(Cookie), 'cart' => null, 'altern' => 1))in modules/ps_shoppingcart/ps_shoppingcart.php (line 114) Ps_Shoppingcart->renderWidget('displayAdminAfterHeader', array('smarty' => object(Smarty_Internal_Template), 'cookie' => object(Cookie), 'cart' => null, 'altern' => 1))in classes/Hook.php (line 929) HookCore::coreRenderWidget(object(Ps_Shoppingcart), 'displayAdminAfterHeader', array('smarty' => object(Smarty_Internal_Template), 'cookie' => object(Cookie), 'cart' => null, 'altern' => 1))in classes/Hook.php (line 881) HookCore::exec('displayAdminAfterHeader', array('smarty' => object(Smarty_Internal_Template)), null)in config/smarty.config.inc.php (line 165) smartyHook(array('h' => 'displayAdminAfterHeader'), object(Smarty_Internal_Template)) call_user_func_array('smartyHook', array(array('h' => 'displayAdminAfterHeader'), object(Smarty_Internal_Template)))in classes/Smarty/SmartyLazyRegister.php (line 83) SmartyLazyRegister->__call('smartyHook', array(array('h' => 'displayAdminAfterHeader'), object(Smarty_Internal_Template))) SmartyLazyRegister->smartyHook(array('h' => 'displayAdminAfterHeader'), object(Smarty_Internal_Template)) call_user_func_array(array(object(SmartyLazyRegister), 'smartyHook'), array(array('h' => 'displayAdminAfterHeader'), object(Smarty_Internal_Template)))in var/cache/dev/smarty/compile/69/dc/d8/69dcd81b4f61c19c4964213b90ccabb2ad43e33b_0.file.header.tpl.php (line 520) content_5ba0c095d7a395_01507873(object(Smarty_Internal_Template))in vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php (line 123) Smarty_Template_Resource_Base->getRenderedTemplateCode(object(Smarty_Internal_Template))in vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php (line 114) Smarty_Template_Compiled->render(object(Smarty_Internal_Template))in vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php (line 206) Smarty_Internal_Template->render(false, 0)in vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php (line 232) Smarty_Internal_TemplateBase->_execute('header.tpl', null, null, null, 0)in vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php (line 116) Smarty_Internal_TemplateBase->fetch('header.tpl')in classes/controller/AdminController.php (line 1826) AdminControllerCore->display()in classes/controller/Controller.php (line 275) ControllerCore->run()in classes/Dispatcher.php (line 428) DispatcherCore->dispatch()in adminko/index.php (line 99) 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