Jump to content

Orders products not shown


Recommended Posts

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 files

or

did you start again? ie installed a fresh copy of prestashop.

Link to comment
Share on other sites

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

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

This error is definately database related and i suspect a MySQL script failing during the upgrade process.

My Solution

1.Backup
2. Upgrade your prestashop through the normal means to the latest version
3. on the same server install a fresh copy of prestashop (seperate database) using the same database prefix that you are using in your prestashop
4. make sure you have remote mysql access to your server (using local xampp will have issues with capital letters)
5. get Navicat for MySQL
6. you will now need to setup a remote mysql connection to your server
7. 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 database
9 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 by shoulders (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hi, I just had this problem with 1.3.2.3

Everything 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

I have similar issue
an 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

  • 3 weeks later...

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 table
3. 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

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 table
3. 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 ;



HI Ohara,
pls help in step by step, for apply patch in database.
thanks


Good luck!

Link to comment
Share on other sites

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 table
3. 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 ;



HI Ohara,
pls help in step by step, for apply patch in database.
thanks


Good 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

  • 1 month later...

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

  • 2 weeks later...
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 table
3. 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

  • 2 weeks later...
  • 4 weeks later...

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

  • 3 months later...
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 table
3. 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!



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

  • 3 months later...

 

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

  • 2 months later...

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

  • 2 months later...
  • 9 months later...

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

  • 8 months later...
×
×
  • Create New...