So the above fixes the products not being displayed on orders, but only for new orders. The following thread has a modified AdminOrders.php (Download Here) 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.
Please note that this solution was written for Prestashop v1.3.x so just bear this in mind when you read them. The solution might still be relevant.
Symptoms
- 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
- We recently came up with a problem after switching from 1.2.5 -> 1.3 -> 1.3.1 in which we would get new orders from customers but doesn’t show under the Orders tab, nor we get an email that an order has been placed like we usually do. Now the strangest part about it is, if we go into the customer’s profile their order shows under their name but when we click the Actions button to view the order, the order information is blank. The products that they ordered doesn’t show, the status doesn’t properly show so we cant edit the status of the order and the invoice is missing. Original thread
- Invoice not displaying purchased product. Original thread
This error is definitely database related and i suspect a MySQL script failing during the upgrade process.
Solution
- Backup, Backup, Backup and then test the backup.
- Upgrade your prestashop through the normal means to the latest version
- on the same server install a fresh copy of prestashop (seperate database) using the same database prefix that you are using in your prestashop
- make sure you have remote mysql access to your server (using local xampp will have issues with capital letters)
- get Navicat for MySQL
- you will now need to setup a remote mysql connection to your server
- 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. (i.e. modules you have installed)
NB the source should be the new/fresh database and the target is the database you want to fix - run the mysql commands to upgrade/syncronise the database
- run compare again to check that everything has worked.
This is my solution originally posted on the prestshop forum here
Prestashop V1.6.x Update - Orders with missing Products
I have recently had this issue with a prestashop v1.6.0.14 install and i have some further solutions:
- Follow the navicat mysql syncronisation instructions above but instead of upgrading your prestashop installation before syncronisation you can just install a fresh version of prestashop with the same version number. The rest of the instructions are the same.
- Upgrade to the latest Prestashop version. Doing this can fix a lot of issues anyway.
- Disable and clear all prestashop caches. You might have stale or corrupt enteries in your cache so even if you fix the problem the cache still maintains the fault.
- Disable all non-core prestashop modules. One of them might be affecting how an order is being process
- Try different payment methods as the Paypal module has been know to cause this issue. See my other article Diagnose PayPal issues in Prestashop
One or more of the these solutions might work but it does not harm to perform all of them. In any case you should put your shop in maintenance mode and heavily test your site until you find the issue. Customers will prefer to wait a little while rather that never a receive an order they are expecting.
Links
- Back Office not creating orders after successful payment - PayPal - PrestaShop - Mentions inputting dodgy addresses or wiered characters can prevent orders being created, testing in maintenance mode will fail and the number of IPN requests can cause a temporary ban and code fixes to the prestashop paypal module v1.3.7 / PS 1.6.0.9
- Most orders do not appear in back office - Configuring & using PrestaShop - PrestaShop - faulty code dues to an upgrade, there were incompatibilites
- Orders not showing up in Backorders - Configuring & using PrestaShop - PrestaShop - This thread describes how the eBay module was causing orders to fail because ithe module was getting executed in the order process, failing, which them ultimately failed the order process. There is some advise on what to do in that situation aswell. It mentions that because of a PayPal outage that orders were effectively not authorised until PayPal's servers came back on and authorised the transactions giving the impression of missing orders.
- Missing products and blank orders - Ecommerce x PrestaShop - PrestaShop - This thread describes how to turn error reporting on and how the author used this information to find out that it was his eBay module causing the issue