cdesseno Posted October 17, 2010 Share Posted October 17, 2010 Hello, I have created a new order in my Prestashop but the order's products are not shown. Also, I can't change the order status (there is no form). No errors are reported in the php log...I have attached an image.Thanks. Link to comment Share on other sites More sharing options...
shoulders Posted October 20, 2010 Share Posted October 20, 2010 i have this issue and i am running 1.3.1.1 , have you found a soltuion. have you tried an upgrade. i am trying to avoid this at the minute unitil it is fixed.thanksshoulders Link to comment Share on other sites More sharing options...
cdesseno Posted October 20, 2010 Author Share Posted October 20, 2010 I have to clean up the db and reinstall prestashop... Luckily, there weren't true real orders. Link to comment Share on other sites More sharing options...
shoulders Posted October 20, 2010 Share Posted October 20, 2010 when you say clean up the database and then reinstall prestashop. I know my way around a mysql database but was there anything in particular you did to fix this issue so i can give it a go.did you manually edit the database and then just reupload the new prestashop filesordid you start again? ie installed a fresh copy of prestashop. Link to comment Share on other sites More sharing options...
cdesseno Posted October 20, 2010 Author Share Posted October 20, 2010 I left my files and made a fresh install. I thinks it was because a module called "Affiliates for All", so you can try to uninstall the last modules you installed. Link to comment Share on other sites More sharing options...
tuk66 Posted October 20, 2010 Share Posted October 20, 2010 Maybe not saved order details after saving the order. Error in a module is most likely. Link to comment Share on other sites More sharing options...
shoulders Posted October 20, 2010 Share Posted October 20, 2010 thanks for the heads up. I am uploading the newest version of prestashop, i am then going to use the unedited version (after upgrade) and my live database to see if the issues still present themseleves and then re introduce the few modules i have used if no issue.I wonder if the database was incorectely updated during my upgrade process. The client did not tell me about any issues until 3months+ after the upgrade because she did not check her BO for orders.maybe this upgrade will check the database. Link to comment Share on other sites More sharing options...
shoulders Posted October 20, 2010 Share Posted October 20, 2010 so far, I tried a new install of prestashop with no modules. then i ran php optimize and repair all tables. at each point i tried a test buy etc.. no joy. I then ran check tables and got the following errors ( below) so i am now goign to install prestashop fresh and compare the database structurse.Problems with indexes of table `myprefix_category_group`More than one INDEX key was created for column `id_category`Problems with indexes of table `myprefix_configuration`UNIQUE and INDEX keys should not both be set for column `name`Problems with indexes of table `myprefix_customer`PRIMARY and INDEX keys should not both be set for column `id_customer`UNIQUE and INDEX keys should not both be set for column `email`Problems with indexes of table `myprefix_customer_group`More than one INDEX key was created for column `id_customer`Problems with indexes of table `myprefix_employee`PRIMARY and INDEX keys should not both be set for column `id_employee`Problems with indexes of table `myprefix_hook_module`PRIMARY and INDEX keys should not both be set for column `id_module`Problems with indexes of table `myprefix_image`UNIQUE and INDEX keys should not both be set for column `id_product`More than one INDEX key was created for column `id_product`Problems with indexes of table `myprefix_image_lang`UNIQUE and INDEX keys should not both be set for column `id_image`Problems with indexes of table `myprefix_module_currency`PRIMARY and INDEX keys should not both be set for column `id_module`Problems with indexes of table `myprefix_order_detail`More than one INDEX key was created for column `id_order`Problems with indexes of table `myprefix_product_attribute`PRIMARY and INDEX keys should not both be set for column `id_product_attribute`More than one INDEX key was created for column `id_product` Link to comment Share on other sites More sharing options...
shoulders Posted October 21, 2010 Share Posted October 21, 2010 (edited) This error is definately database related and i suspect a MySQL script failing during the upgrade process.My Solution1.Backup2. Upgrade your prestashop through the normal means to the latest version3. on the same server install a fresh copy of prestashop (seperate database) using the same database prefix that you are using in your prestashop4. make sure you have remote mysql access to your server (using local xampp will have issues with capital letters)5. get Navicat for MySQL6. you will now need to setup a remote mysql connection to your server7. now compare the 2 databases (tools/structure syncronisation), the source database should be the fresh/new copy of prestashop and the target is the old damaged one. when compared you should see a lot of differences and this is the fault. please make sure the database are the right way round (source/target). DO NOT DROP tables as these will most likely not be present on a fresh database on purpose.8. run the mysql commands to upgrade the database9 run compare again to check that everything has worked.So the above fixes the products not being displayed on orders, but only for new orders. The following thread has a modified AdminOrders.php with a button that repopulates orders with the correct products when missing. It will work if you rename your current admin orders and use this one. I would recommend putting the new version back when you are done.Download Here Edited September 13, 2015 by shoulders (see edit history) Link to comment Share on other sites More sharing options...
arkwhat Posted October 23, 2010 Share Posted October 23, 2010 I just replaced one file and then it works fine. after that, it created a button to move the product in cart into order page. see the file attached. AdminOrders.php 1 Link to comment Share on other sites More sharing options...
Chrisz Posted December 7, 2010 Share Posted December 7, 2010 Hi, I just had this problem with 1.3.2.3Everything seemed to work fine but no order_detail lines were written, so no products listed against an order and you cant cancel the order without them.The problem was a rooky mistake: I had upgraded from 1.3.1.1 ... but had forgotten to do the last step of the upgrade to re-run the install program in upgrade mode Now all is fine for new orders but any orders created before upgrade don't have detail lines. As this is a development system I used phpmyadmin to remove the duff orders manually.Hope this helps someone else.Chris Link to comment Share on other sites More sharing options...
tokobukutaro Posted December 10, 2010 Share Posted December 10, 2010 I have similar issuean email notification that I received without body text only show header of my website.but after check to customer Yes, they receive email notification in full text, complete with detail products, shipping fee and bank account no. in BO Order working normal. I can find the order.problem just in email that admin received.pls anyone help me.thanks Link to comment Share on other sites More sharing options...
ohara Posted December 31, 2010 Share Posted December 31, 2010 This is what worked for me:Past this SQL into your damaged prestashop database:1. Make sure to change ps_order_detail if your database prefix is not "ps"2. This is a version 1.3.5 ps_order_detail table that I put over on damaged 1.3.3 ps_order_detail table3. This patch will only apply to new order placed since the patch CREATE TABLE IF NOT EXISTS `ps_order_detail` ( `id_order_detail` int(10) unsigned NOT NULL auto_increment, `id_order` int(10) unsigned NOT NULL, `product_id` int(10) unsigned NOT NULL, `product_attribute_id` int(10) unsigned default NULL, `product_name` varchar(255) NOT NULL, `product_quantity` int(10) unsigned NOT NULL default '0', `product_quantity_in_stock` int(10) unsigned NOT NULL default '0', `product_quantity_refunded` int(10) unsigned NOT NULL default '0', `product_quantity_return` int(10) unsigned NOT NULL default '0', `product_quantity_reinjected` int(10) unsigned NOT NULL default '0', `product_price` decimal(20,6) NOT NULL default '0.000000', `reduction_percent` decimal(10,2) NOT NULL default '0.00', `reduction_amount` decimal(20,6) NOT NULL default '0.000000', `group_reduction` decimal(10,2) NOT NULL default '0.00', `product_quantity_discount` decimal(20,6) NOT NULL default '0.000000', `product_ean13` varchar(13) default NULL, `product_reference` varchar(32) default NULL, `product_supplier_reference` varchar(32) default NULL, `product_weight` float NOT NULL, `tax_name` varchar(16) NOT NULL, `tax_rate` decimal(10,3) NOT NULL default '0.000', `ecotax` decimal(21,6) NOT NULL default '0.000000', `ecotax_tax_rate` decimal(5,3) NOT NULL, `discount_quantity_applied` tinyint(1) NOT NULL default '0', `download_hash` varchar(255) default NULL, `download_nb` int(10) unsigned default '0', `download_deadline` datetime default '0000-00-00 00:00:00', PRIMARY KEY (`id_order_detail`), KEY `order_detail_order` (`id_order`), KEY `product_id` (`product_id`), KEY `product_attribute_id` (`product_attribute_id`), KEY `id_order_id_order_detail` (`id_order`,`id_order_detail`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; Good luck! Link to comment Share on other sites More sharing options...
tokobukutaro Posted January 2, 2011 Share Posted January 2, 2011 This is what worked for me:Past this SQL into your damaged prestashop database:1. Make sure to change ps_order_detail if your database prefix is not "ps"2. This is a version 1.3.5 ps_order_detail table that I put over on damaged 1.3.3 ps_order_detail table3. This patch will only apply to new order placed since the patchCREATE TABLE IF NOT EXISTS `ps_order_detail` ( `id_order_detail` int(10) unsigned NOT NULL auto_increment, `id_order` int(10) unsigned NOT NULL, `product_id` int(10) unsigned NOT NULL, `product_attribute_id` int(10) unsigned default NULL, `product_name` varchar(255) NOT NULL, `product_quantity` int(10) unsigned NOT NULL default '0', `product_quantity_in_stock` int(10) unsigned NOT NULL default '0', `product_quantity_refunded` int(10) unsigned NOT NULL default '0', `product_quantity_return` int(10) unsigned NOT NULL default '0', `product_quantity_reinjected` int(10) unsigned NOT NULL default '0', `product_price` decimal(20,6) NOT NULL default '0.000000', `reduction_percent` decimal(10,2) NOT NULL default '0.00', `reduction_amount` decimal(20,6) NOT NULL default '0.000000', `group_reduction` decimal(10,2) NOT NULL default '0.00', `product_quantity_discount` decimal(20,6) NOT NULL default '0.000000', `product_ean13` varchar(13) default NULL, `product_reference` varchar(32) default NULL, `product_supplier_reference` varchar(32) default NULL, `product_weight` float NOT NULL, `tax_name` varchar(16) NOT NULL, `tax_rate` decimal(10,3) NOT NULL default '0.000', `ecotax` decimal(21,6) NOT NULL default '0.000000', `ecotax_tax_rate` decimal(5,3) NOT NULL, `discount_quantity_applied` tinyint(1) NOT NULL default '0', `download_hash` varchar(255) default NULL, `download_nb` int(10) unsigned default '0', `download_deadline` datetime default '0000-00-00 00:00:00', PRIMARY KEY (`id_order_detail`), KEY `order_detail_order` (`id_order`), KEY `product_id` (`product_id`), KEY `product_attribute_id` (`product_attribute_id`), KEY `id_order_id_order_detail` (`id_order`,`id_order_detail`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; HI Ohara,pls help in step by step, for apply patch in database.thanksGood luck! Link to comment Share on other sites More sharing options...
O Gato Hobby Posted January 5, 2011 Share Posted January 5, 2011 This is what worked for me:Past this SQL into your damaged prestashop database:1. Make sure to change ps_order_detail if your database prefix is not "ps"2. This is a version 1.3.5 ps_order_detail table that I put over on damaged 1.3.3 ps_order_detail table3. This patch will only apply to new order placed since the patchCREATE TABLE IF NOT EXISTS `ps_order_detail` ( `id_order_detail` int(10) unsigned NOT NULL auto_increment, `id_order` int(10) unsigned NOT NULL, `product_id` int(10) unsigned NOT NULL, `product_attribute_id` int(10) unsigned default NULL, `product_name` varchar(255) NOT NULL, `product_quantity` int(10) unsigned NOT NULL default '0', `product_quantity_in_stock` int(10) unsigned NOT NULL default '0', `product_quantity_refunded` int(10) unsigned NOT NULL default '0', `product_quantity_return` int(10) unsigned NOT NULL default '0', `product_quantity_reinjected` int(10) unsigned NOT NULL default '0', `product_price` decimal(20,6) NOT NULL default '0.000000', `reduction_percent` decimal(10,2) NOT NULL default '0.00', `reduction_amount` decimal(20,6) NOT NULL default '0.000000', `group_reduction` decimal(10,2) NOT NULL default '0.00', `product_quantity_discount` decimal(20,6) NOT NULL default '0.000000', `product_ean13` varchar(13) default NULL, `product_reference` varchar(32) default NULL, `product_supplier_reference` varchar(32) default NULL, `product_weight` float NOT NULL, `tax_name` varchar(16) NOT NULL, `tax_rate` decimal(10,3) NOT NULL default '0.000', `ecotax` decimal(21,6) NOT NULL default '0.000000', `ecotax_tax_rate` decimal(5,3) NOT NULL, `discount_quantity_applied` tinyint(1) NOT NULL default '0', `download_hash` varchar(255) default NULL, `download_nb` int(10) unsigned default '0', `download_deadline` datetime default '0000-00-00 00:00:00', PRIMARY KEY (`id_order_detail`), KEY `order_detail_order` (`id_order`), KEY `product_id` (`product_id`), KEY `product_attribute_id` (`product_attribute_id`), KEY `id_order_id_order_detail` (`id_order`,`id_order_detail`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; HI Ohara,pls help in step by step, for apply patch in database.thanksGood luck! You have to login in your phpadmin and execute it, but for me It doesn't work. The button that regenerate the order have a problem too. It subtract again from the stock when we click it. Link to comment Share on other sites More sharing options...
I am Oleg Posted February 13, 2011 Share Posted February 13, 2011 Ohara, I love you! It works.I bought a template FOOD ONLINE which supposed to install it's own SQL base. And that base missed two lines of code that you wrote above!I used your code and the problem is SOLVED now!!!Thank you!!!P.S. How can people sell things which are do not work correctly???!!! Link to comment Share on other sites More sharing options...
GiuseppeCODI Posted February 28, 2011 Share Posted February 28, 2011 This is what worked for me:Past this SQL into your damaged prestashop database:1. Make sure to change ps_order_detail if your database prefix is not "ps"2. This is a version 1.3.5 ps_order_detail table that I put over on damaged 1.3.3 ps_order_detail table3. This patch will only apply to new order placed since the patchCREATE TABLE IF NOT EXISTS `ps_order_detail` ( `id_order_detail` int(10) unsigned NOT NULL auto_increment, `id_order` int(10) unsigned NOT NULL, `product_id` int(10) unsigned NOT NULL, `product_attribute_id` int(10) unsigned default NULL, `product_name` varchar(255) NOT NULL, `product_quantity` int(10) unsigned NOT NULL default '0', `product_quantity_in_stock` int(10) unsigned NOT NULL default '0', `product_quantity_refunded` int(10) unsigned NOT NULL default '0', `product_quantity_return` int(10) unsigned NOT NULL default '0', `product_quantity_reinjected` int(10) unsigned NOT NULL default '0', `product_price` decimal(20,6) NOT NULL default '0.000000', `reduction_percent` decimal(10,2) NOT NULL default '0.00', `reduction_amount` decimal(20,6) NOT NULL default '0.000000', `group_reduction` decimal(10,2) NOT NULL default '0.00', `product_quantity_discount` decimal(20,6) NOT NULL default '0.000000', `product_ean13` varchar(13) default NULL, `product_reference` varchar(32) default NULL, `product_supplier_reference` varchar(32) default NULL, `product_weight` float NOT NULL, `tax_name` varchar(16) NOT NULL, `tax_rate` decimal(10,3) NOT NULL default '0.000', `ecotax` decimal(21,6) NOT NULL default '0.000000', `ecotax_tax_rate` decimal(5,3) NOT NULL, `discount_quantity_applied` tinyint(1) NOT NULL default '0', `download_hash` varchar(255) default NULL, `download_nb` int(10) unsigned default '0', `download_deadline` datetime default '0000-00-00 00:00:00', PRIMARY KEY (`id_order_detail`), KEY `order_detail_order` (`id_order`), KEY `product_id` (`product_id`), KEY `product_attribute_id` (`product_attribute_id`), KEY `id_order_id_order_detail` (`id_order`,`id_order_detail`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; Good luck! Link to comment Share on other sites More sharing options...
iwo Posted March 15, 2011 Share Posted March 15, 2011 I have upgraded my shop to version 1.3.7 and I can`t change status orders as well. Upper solution doesn`t work for me. Do you know what to do for 1.3.7 Prestashop? Link to comment Share on other sites More sharing options...
acfour Posted April 6, 2011 Share Posted April 6, 2011 I am having a major problem with this error cans someone please contact me to fix this problem via PM will pay to have this fixed! Link to comment Share on other sites More sharing options...
Ralf mit F Posted April 7, 2011 Share Posted April 7, 2011 I have 1.3.7 too and I can not see the products in my Admin Mail (mail alert module from standard modules). I even tried the english mail from the installation directory - but instead of a list of products I just see {items}Changing it to {products}{discounts}from Customer Oder Confirmation Mail helps nothing - just displays what you see above - not the products! Someone has an idea?Cheers, Ralf Link to comment Share on other sites More sharing options...
StickGrinder Posted July 18, 2011 Share Posted July 18, 2011 This is what worked for me:Past this SQL into your damaged prestashop database:1. Make sure to change ps_order_detail if your database prefix is not "ps"2. This is a version 1.3.5 ps_order_detail table that I put over on damaged 1.3.3 ps_order_detail table3. This patch will only apply to new order placed since the patchCREATE TABLE IF NOT EXISTS `ps_order_detail` ( `id_order_detail` int(10) unsigned NOT NULL auto_increment, `id_order` int(10) unsigned NOT NULL, `product_id` int(10) unsigned NOT NULL, `product_attribute_id` int(10) unsigned default NULL, `product_name` varchar(255) NOT NULL, `product_quantity` int(10) unsigned NOT NULL default '0', `product_quantity_in_stock` int(10) unsigned NOT NULL default '0', `product_quantity_refunded` int(10) unsigned NOT NULL default '0', `product_quantity_return` int(10) unsigned NOT NULL default '0', `product_quantity_reinjected` int(10) unsigned NOT NULL default '0', `product_price` decimal(20,6) NOT NULL default '0.000000', `reduction_percent` decimal(10,2) NOT NULL default '0.00', `reduction_amount` decimal(20,6) NOT NULL default '0.000000', `group_reduction` decimal(10,2) NOT NULL default '0.00', `product_quantity_discount` decimal(20,6) NOT NULL default '0.000000', `product_ean13` varchar(13) default NULL, `product_reference` varchar(32) default NULL, `product_supplier_reference` varchar(32) default NULL, `product_weight` float NOT NULL, `tax_name` varchar(16) NOT NULL, `tax_rate` decimal(10,3) NOT NULL default '0.000', `ecotax` decimal(21,6) NOT NULL default '0.000000', `ecotax_tax_rate` decimal(5,3) NOT NULL, `discount_quantity_applied` tinyint(1) NOT NULL default '0', `download_hash` varchar(255) default NULL, `download_nb` int(10) unsigned default '0', `download_deadline` datetime default '0000-00-00 00:00:00', PRIMARY KEY (`id_order_detail`), KEY `order_detail_order` (`id_order`), KEY `product_id` (`product_id`), KEY `product_attribute_id` (`product_attribute_id`), KEY `id_order_id_order_detail` (`id_order`,`id_order_detail`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; Good luck! Maybe this thread is outdated, but thanks ohara, this solved my issue.To add to your post, I had this problem without upgrades or such, just migrating my site to new host. I don't know what went wrong but truncating orders table and recreating from scratch order_details with your query solved and it now works like a charm!Thanks again! Link to comment Share on other sites More sharing options...
Raggy786 Posted October 25, 2011 Share Posted October 25, 2011 Maybe this thread is outdated, but thanks ohara, this solved my issue. To add to your post, I had this problem without upgrades or such, just migrating my site to new host. I don't know what went wrong but truncating orders table and recreating from scratch order_details with your query solved and it now works like a charm! Thanks again! Did this work on all orders over 41? I can not see any order placed over 41? prestashop Version 1.3.3.0 Link to comment Share on other sites More sharing options...
chetwyn Posted January 3, 2012 Share Posted January 3, 2012 im running 1.3.7 cause I was stupid and bought an old design so im going through all the pain of getting it working. I replaced my 1.3.7 Admin Order.php with the one posted in this thread and all is working correctly now. backup your old one first Link to comment Share on other sites More sharing options...
Mr.Beetroot Posted March 29, 2012 Share Posted March 29, 2012 Solution with replacing AdminOrders.php (by Arkwhat) in Admin/Tabs works. The products don't show up in invoices though... Link to comment Share on other sites More sharing options...
petete2008 Posted January 24, 2013 Share Posted January 24, 2013 I have the same problem with version 1.3.6. Sometimes the products are not show in the BO I just replaced one file and then it works fine. after that, it created a button to move the product in cart into order page. see the file attached. Is this file that corresponds prestashop version? Thanks Link to comment Share on other sites More sharing options...
neomed Posted October 7, 2013 Share Posted October 7, 2013 Any solution for PS 1.4.9? I checked the DB and the order_detail table is empty! It used to work before. Link to comment Share on other sites More sharing options...
Recommended Posts