visamc Posted March 10, 2015 Share Posted March 10, 2015 I moved my site to a new server at Liquid Web, but I can no longer add products to the cart. Below is the debug error. Can anyone advise? I took over the site, so I am a Prestashop newbie. [PrestaShopDatabaseException] Field 'id_cart_importermagento' doesn't have a default value INSERT INTO `ps_cart` (`id_shop_group`, `id_shop`, `id_address_delivery`, `id_address_invoice`, `id_carrier`, `id_currency`, `id_customer`, `id_guest`, `id_lang`, `recyclable`, `gift`, `gift_message`, `mobile_theme`, `delivery_option`, `secure_key`, `allow_seperated_package`, `date_add`, `date_upd`) VALUES ('1', '1', '0', '0', '0', '2', '0', '0', '1', '0', '0', '', '0', '', '', '0', '2015-03-10 15:50:04', '2015-03-10 15:50:04') at line 607 in file classes/db/Db.php 601. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);602. }603. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))604. {605. if ($sql)606. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');607. throw new PrestaShopDatabaseException($this->getMsgError());608. }609. }610. 611. /** DbCore->displayError - [line 307 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 581 - classes/db/Db.php] - [1 Arguments] DbCore->q - [line 372 - classes/db/Db.php] - [2 Arguments] DbCore->insert - [line 465 - classes/ObjectModel.php] - [3 Arguments] ObjectModelCore->add - [line 179 - classes/Cart.php] - [1 Arguments] CartCore->add - [line 102 - override/controllers/front/CartController.php] - [0 Argument] CartController->processChangeProductInCart - [line 25 - override/controllers/front/CartController.php] - [0 Argument] CartController->postProcess - [line 158 - classes/controller/Controller.php] - [0 Argument] ControllerCore->run - [line 349 - classes/Dispatcher.php] - [0 Argument] DispatcherCore->dispatch - [line 28 - index.php] - [0 Argument] Link to comment Share on other sites More sharing options...
Laur Posted March 11, 2015 Share Posted March 11, 2015 Clear your smarty cache and then will work Had this issue a few time ago and this is how i got it work. If not please come back here. Cheers. Link to comment Share on other sites More sharing options...
visamc Posted March 12, 2015 Author Share Posted March 12, 2015 Unfortunately, that doesn't work. Any other suggestions? Link to comment Share on other sites More sharing options...
visamc Posted March 16, 2015 Author Share Posted March 16, 2015 Anyone have any suggestions? Still no luck. I can PM the site. Link to comment Share on other sites More sharing options...
rocky Posted March 17, 2015 Share Posted March 17, 2015 It seems your ps_cart table has a id_cart_importermagento field. Obviously, since PrestaShop doesn't have such a field, an error is being thrown when it tries to add a row without that column. I'd be asking for support from the developer of the module that added that field to your database. But if you can't get any support, the easiest solution would be to log in to phpMyAdmin, go to ps_cart table, go to the Structure tab, edit the id_cart_importermagento field and then enter an appropriate default value. I guess 0 will do. Link to comment Share on other sites More sharing options...
visamc Posted March 17, 2015 Author Share Posted March 17, 2015 That solved it. Thanks a ton! 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