parrolla Posted September 8, 2015 Share Posted September 8, 2015 (edited) Hello everyone, I recently updated my website to the latest version of prestashop (1.6.1.1) and I found that the tab order product name does not appear. Product name is not contain in invoices or in the email that I get when there is a new order. Edited September 8, 2015 by parrolla (see edit history) 1 Link to comment Share on other sites More sharing options...
NemoPS Posted September 9, 2015 Share Posted September 9, 2015 More than the name, it's the whole entry not being there. Can you turn on dev mode (see my signature) and report any error you get? It seems it's not saved in the order_detail table, at first glance Link to comment Share on other sites More sharing options...
parrolla Posted September 12, 2015 Author Share Posted September 12, 2015 Unknown column 'original_wholesale_price' in 'field list' INSERT INTO `ps_order_detail` (`id_order`, `id_order_invoice`, `id_warehouse`, `id_shop`, `product_id`, `product_attribute_id`, `product_name`, `product_quantity`, `product_quantity_in_stock`, `product_quantity_return`, `product_quantity_refunded`, `product_quantity_reinjected`, `product_price`, `reduction_percent`, `reduction_amount`, `reduction_amount_tax_incl`, `reduction_amount_tax_excl`, `group_reduction`, `product_quantity_discount`, `product_ean13`, `product_upc`, `product_reference`, `product_supplier_reference`, `product_weight`, `tax_name`, `tax_rate`, `tax_computation_method`, `id_tax_rules_group`, `ecotax`, `ecotax_tax_rate`, `discount_quantity_applied`, `download_hash`, `download_nb`, `download_deadline`, `unit_price_tax_incl`, `unit_price_tax_excl`, `total_price_tax_incl`, `total_price_tax_excl`, `total_shipping_price_tax_excl`, `total_shipping_price_tax_incl`, `purchase_supplier_price`, `original_product_price`, `original_wholesale_price`) VALUES ('19', '0', '0', '1', '17', '0', 'IMUNOFORTE', '1', '1', '0', '0', '0', '12.096774', '0', '0', '0', '0', '0', '0', '', '', 'SUP004', '', '0', '', '0', '0', '53', '0', '0', '0', '', '0', '0000-00-00 00:00:00', '15', '12.096774', '15', '12.1', '0', '0', '0', '12.096774', '0') at line 791 in file classes/db/Db.php 786. if ($webservice_call && $errno) {787. $dbg = debug_backtrace();788. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {790. if ($sql) {791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');792. }793. 794. throw new PrestaShopDatabaseException($this->getMsgError());795. }796. } DbCore->displayError - [line 425 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 763 - classes/db/Db.php] - [1 Arguments] DbCore->q - [line 514 - classes/db/Db.php] - [2 Arguments] DbCore->insert - [line 487 - classes/ObjectModel.php] - [3 Arguments] ObjectModelCore->add - [line 802 - classes/order/OrderDetail.php] - [2 Arguments] OrderDetailCore->add - [line 445 - classes/ObjectModel.php] - [2 Arguments] ObjectModelCore->save - [line 653 - classes/order/OrderDetail.php] OrderDetailCore->create - [line 678 - classes/order/OrderDetail.php] - [7 Arguments] OrderDetailCore->createList - [line 364 - classes/PaymentModule.php] - [7 Arguments] PaymentModuleCore->validateOrder - [line 59 - modules/cashondelivery/controllers/front/validation.php] - [9 Arguments] CashondeliveryValidationModuleFrontController->postProcess - [line 178 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] Link to comment Share on other sites More sharing options...
NemoPS Posted September 12, 2015 Share Posted September 12, 2015 THat's a custom column, which is missing from the db, Did you hardcoded modifications into the orderDetail class? Link to comment Share on other sites More sharing options...
laurapessoa Posted November 30, 2015 Share Posted November 30, 2015 Hi, I have the same problem. I can't see products in the backoffice, I have received the Paypal pay confirmation with all the details, but in the database the order n.97 it is not generatinf the ps_order_details. I attached 2 pics of the problem. Thank you very much. Link to comment Share on other sites More sharing options...
NemoPS Posted December 2, 2015 Share Posted December 2, 2015 Did you add the missing column if you get the same error? Link to comment Share on other sites More sharing options...
laurapessoa Posted December 2, 2015 Share Posted December 2, 2015 (edited) Hi fabio, thanks for reply. I have created manually the missing columns (2 because there was 2 products in the order) in the db. Thanks to this I can stamp the PDF and see the complete order in the backoffice, but I am scared about the idea that this won't be generated automatically next time... Edited December 2, 2015 by laurapessoa (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted December 4, 2015 Share Posted December 4, 2015 If the columns are not missing anymore, it should work (you can always place a test order and see if it works) Link to comment Share on other sites More sharing options...
DanieleDR Posted December 9, 2015 Share Posted December 9, 2015 I have same problem, but I don't understand how to right configure that issue. Please you can explain me? Thanks in advance. Regard Link to comment Share on other sites More sharing options...
NemoPS Posted December 9, 2015 Share Posted December 9, 2015 You need to login to your database through phpmyadmin, then reach the broken table, hit "structure" and add the columns you are missing Link to comment Share on other sites More sharing options...
DanieleDR Posted December 9, 2015 Share Posted December 9, 2015 Thanks Nemo1, but because I'm newest on prestashop, I need a detailed explain of that solution. In my ps_order_details table the id_order is stopped last placing order before upgrading to prestashop 1.6. Please explain to me as a beginner Link to comment Share on other sites More sharing options...
NemoPS Posted December 9, 2015 Share Posted December 9, 2015 This is not really related to prestashop, it's just phpmyadmin. What's your exact error? Which columns are missing? Link to comment Share on other sites More sharing options...
DanieleDR Posted December 9, 2015 Share Posted December 9, 2015 (edited) since I upgraded to version 1.6 orders are not register in the table ps_detail. If I try with the last order: SELECT * FROM `ps_order_detail` or LEFT JOIN `ps_product` p ON (p.id_product = od.product_id) LEFT JOIN `ps_product_shop` ps ON (ps.id_product = p.id_product AND ps.id_shop = od.id_shop) WHERE od.`id_order` = 224 <- not showing last order the result is' MySQL returned an empty set (ie zero rows). " however if I write: SELECT * FROM `ps_order_detail` or LEFT JOIN `ps_product` p ON (p.id_product = od.product_id) LEFT JOIN `ps_product_shop` ps ON (ps.id_product = p.id_product AND ps.id_shop = od.id_shop) WHERE od.`id_order` = 213 <- last placed order the result are correct, there are three products on order, 3 records registrered. ps_order_detail not record incoming orders!!Help meee Edited December 9, 2015 by DanieleDR (see edit history) Link to comment Share on other sites More sharing options...
DanieleDR Posted December 9, 2015 Share Posted December 9, 2015 This is the resul of the debug mode: [PrestaShopException]Property StockAvailable->id_product_attribute is emptyat line 909 in file classes/ObjectModel.php 904. }905.906. $message = $this->validateField($field, $this->$field);907. if ($message !== true) {908. if ($die) {909. throw new PrestaShopException($message);910. }911. return $error_return ? $message : false;912. }913. }914. ObjectModelCore->validateFields - [line 246 - classes/ObjectModel.php] ObjectModelCore->getFields - [line 652 - classes/ObjectModel.php] ObjectModelCore->update - [line 406 - classes/stock/StockAvailable.php] - [1 Arguments] StockAvailableCore->update - [line 128 - Core/Business/Stock/Core_Business_Stock_StockManager.php] Core_Business_Stock_StockManager->updateQuantity - [line 472 - classes/stock/StockAvailable.php] - [4 Arguments] StockAvailableCore::updateQuantity - [line 473 - classes/order/OrderDetail.php] - [3 Arguments] OrderDetailCore->checkProductStock - [line 638 - classes/order/OrderDetail.php] - [2 Arguments] OrderDetailCore->create - [line 678 - classes/order/OrderDetail.php] - [7 Arguments] OrderDetailCore->createList - [line 330 - modules/cashondelivery/cashondelivery.php] - [7 Arguments] CashOnDelivery->validateOrder - [line 61 - modules/cashondelivery/controllers/front/validation.php] - [9 Arguments] CashondeliveryValidationModuleFrontController->postProcess - [line 178 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] Link to comment Share on other sites More sharing options...
NemoPS Posted December 11, 2015 Share Posted December 11, 2015 Get a clean package of your version, and copy over the whole /classes directory (keep a backup of yours, just in case) Link to comment Share on other sites More sharing options...
laurapessoa Posted February 10, 2016 Share Posted February 10, 2016 After all this time creating order details manually.... I have noticed that comparing with other website that works perfectly I was missing the last column in the ps_order_detail, it is called original_wholesale_price. I have created it manually copying from the other DB and I hope it works for the next time, because I can't get enought of create products in orders manually.... I will let you know. Link to comment Share on other sites More sharing options...
Recommended Posts