jfacero Posted November 23, 2010 Share Posted November 23, 2010 Hello, I have installed prestashop and I face a problem. When I receive an order, this order appears in my Backoffice without products and I can´t see which products have been bought. I can´t change the order status either.Does anyone knows how to solve this?Thanks! Link to comment Share on other sites More sharing options...
DevNet Posted November 23, 2010 Share Posted November 23, 2010 Hi,Is this the case for all commands?Best regards Link to comment Share on other sites More sharing options...
jfacero Posted November 23, 2010 Author Share Posted November 23, 2010 What do you refer with commands? Link to comment Share on other sites More sharing options...
DevNet Posted November 23, 2010 Share Posted November 23, 2010 Sorry,Orders in french is "commandes".My question : Is this the case for all orders ? Link to comment Share on other sites More sharing options...
jfacero Posted November 23, 2010 Author Share Posted November 23, 2010 Yes, for all the orders!When I test my shop in local with xampp, it works properly.... but I don´t find any difference between the two systems.Thanks! Link to comment Share on other sites More sharing options...
DevNet Posted November 23, 2010 Share Posted November 23, 2010 Can you make a screenshot ? Link to comment Share on other sites More sharing options...
jfacero Posted November 23, 2010 Author Share Posted November 23, 2010 Here is it!Any idea?Thanks Link to comment Share on other sites More sharing options...
jfacero Posted November 23, 2010 Author Share Posted November 23, 2010 I got a button from the forum and when is pressed, it obtain the order products, but this is a temporal solution. Is not comfortable for me to press the button when an order is made. Link to comment Share on other sites More sharing options...
Zenith Posted November 23, 2010 Share Posted November 23, 2010 This 1.4.0.2 bug has been reported to the team, hopefully we get a fix soon.http://www.prestashop.com/bug_tracker/view/5978/http://www.prestashop.com/bug_tracker/view/5972/ In the meantime comment out or delete this line from "modules/mailalerts/mailalerts.php" '{product_link}' => $link->getProductLink($product) Link to comment Share on other sites More sharing options...
jfacero Posted November 23, 2010 Author Share Posted November 23, 2010 The error continues....When a user makes a order and press into orders section, he can see this (see image attached)Would it be solved by commenting the line code that you refer?Thank you! Link to comment Share on other sites More sharing options...
Zenith Posted November 24, 2010 Share Posted November 24, 2010 I posted it so you can temp fix it and will get order details. It won't fix any previous orders that don't have products, these need to be fixed by manually adding the products via the database, but it will fix future orders. Link to comment Share on other sites More sharing options...
Guest kumon Posted December 6, 2010 Share Posted December 6, 2010 Hi Zenith,I am using Prestashop 1.3.2.3.I have done as you suggested, but the orders are still not being populated with products.I have commented out this line from modules/mailalerts/mailalerts.php '{product_link}' => $link->getProductLink($product)Orders are still empty of products.This is the whole picture:1. Order email notification is received with productsSee attached image on left below.2. Front end shows order with correct amount, but order does not contain products. If you download order PDF, it also shows correct amount but no products.See attached image in the center below.3. Back end also shows order with correct amount but also no products.See attached image on right below.Is there any other quick fix I can try?What exactly is your suggestion trying to fix?Thank you. Link to comment Share on other sites More sharing options...
Guest kumon Posted December 6, 2010 Share Posted December 6, 2010 jfaceroDo you have a template installed?Test without template.I have the same problem, but it seems that only happens with a template.I am looking into it. Link to comment Share on other sites More sharing options...
jayxflash Posted December 7, 2010 Share Posted December 7, 2010 I'm having the same problem. And it persists even with the default theme. Link to comment Share on other sites More sharing options...
Guest kumon Posted December 7, 2010 Share Posted December 7, 2010 I'm having the same problem. And it persists even with the default theme. Hi jayflash,When you say it persists even with the default theme, do you mean you have made a fresh Prestashop install or you just de-selected the current theme and selected the default theme in the back-end?I have noticed that, in my case, it is the theme installation process that creates this problem. More specifically, in my case, it is after importing the mySQL dump that comes with the theme into the MySQL database that the problem starts happening.If you installed a template and imported a mySQL dump that came with the theme, would you please try this1.- do a fresh Prestashop install, 2.- install the theme, without importing the mySQL dump, 3.- test the order-product issue If the order-product is working ok, then import the mySQL dump and test again. If your case is like mine, you will see the problem happening now. Link to comment Share on other sites More sharing options...
jayxflash Posted December 7, 2010 Share Posted December 7, 2010 I have the original theme modified, no no SQL injection from here. But I do have installed the iPrestashop theme. I'll install the store from scratch, and activate addons one -by-one to try to trace the problem. Link to comment Share on other sites More sharing options...
Zenith Posted December 7, 2010 Share Posted December 7, 2010 Change the mailalerts.php code to look like this (I'm thinking you have only commented out the line so it will produce an error being in the middle of the array. $templateVars = array( '{product}' => (is_array($product->name) ? $product->name[(int)(Configuration::get('PS_LANG_DEFAULT'))] : $product->name) ); /* $templateVars = array( '{product}' => (is_array($product->name) ? $product->name[(int)(Configuration::get('PS_LANG_DEFAULT'))] : $product->name), '{product_link}' => $link->getProductLink($product) ); */ My temp fix skips getting the product link for the e-mail notification template, this is what is causing an error. When the error occurs on the first product the product is not added and the process is stopped, thus no items get added to the database as part of the order. Removing this line lets the order go through without an error and be entered into the database.The notification e-mail that gets sent out is sent without a working link, but this is really not an issue compared to no products in the order being added to the database. Link to comment Share on other sites More sharing options...
Guest kumon Posted December 7, 2010 Share Posted December 7, 2010 I have the original theme modified, no no SQL injection from here. But I do have installed the iPrestashop theme. I'll install the store from scratch, and activate addons one -by-one to try to trace the problem. Please, do let me know if you find what is causing it in your case. Link to comment Share on other sites More sharing options...
Guest kumon Posted December 7, 2010 Share Posted December 7, 2010 Thank you Zenith,I have tried what you suggest, but it is not working for me. This is the code in my mailalerts.php; $templateVars = array( '{product}' => (is_array($product->name) ? $product->name[(int)(Configuration::get('PS_LANG_DEFAULT'))] : $product->name) ); // // the third line below is commented out following instructions from http://www.prestashop.com/forums/member/35794/zenith/ // See http://www.prestashop.com/forums/viewthread/79640/#337733 // // $templateVars = array( // '{product}' => (is_array($product->name) ? $product->name[intval(Configuration::get('PS_LANG_DEFAULT'))] : $product->name), // '{product_link}' => $link->getProductLink($product) // ); but I still have empty orders in front and backend. See attachment.By the way, what version of Prestashop are you running?Mine is 1.3.2.3. Link to comment Share on other sites More sharing options...
Zenith Posted December 7, 2010 Share Posted December 7, 2010 I'm using the SVN, but the same code applies from 1.3.2.3.Do you have a PHP "error_log" file in the root directory of your site....this may shed some light on what error exactly you have. Link to comment Share on other sites More sharing options...
jayxflash Posted December 7, 2010 Share Posted December 7, 2010 - I have 1.3.2.3- Changed the code - commented all the specified lines- no error_log file generated...keep on digging... Link to comment Share on other sites More sharing options...
Zenith Posted December 7, 2010 Share Posted December 7, 2010 Are either of you using a language that is not English?Maybe the email template is missing in another language?Also, turn on debugging in "config/config.inc.php" line 4 @ini_set('display_errors', 'on'); Link to comment Share on other sites More sharing options...
Guest kumon Posted December 7, 2010 Share Posted December 7, 2010 I'm using the SVN, but the same code applies from 1.3.2.3.Do you have a PHP "error_log" file in the root directory of your site....this may shed some light on what error exactly you have. Hi, thanks.I had a huge error_log. I have deleted it and repeated the order process to get a smaller file. See attached error_log files:- error_log 06.txt this contains error logs for 6 steps in the process.- error_log-just-confirm-order.txt this contains error logs for only the last step in the process - Confirm order.From what I can see, there is no error directly related to mailalerts.php.There seems to be a problem with homefeatured.tpl.php, and some problem related to GD and These two lines keep repeating in all error logs:[07-dic-2010 17:55:22] PHP Warning: Division by zero in /home/queorigi/public_html/tools/smarty/compile/%�^EB1^EB1BCB1C%%homefeatured.tpl.php on line 17 [07-Dec-2010 17:55:34] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_gd2.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_gd2.dll: cannot open shared object file: No such file or directory in Unknown on line 0 error_log 06.txt error_log-just-confirm-order.txt Link to comment Share on other sites More sharing options...
Guest kumon Posted December 7, 2010 Share Posted December 7, 2010 Are either of you using a language that is not English?Maybe the email template is missing in another language?Also, turn on debugging in "config/config.inc.php" line 4@ini_set('display_errors', 'on'); Hi, I am using Spanish !How can I test whether a missing email template is the cause?I just turned display_errors on. Link to comment Share on other sites More sharing options...
Guest kumon Posted December 7, 2010 Share Posted December 7, 2010 I have turned errors on /* Debug only */ ini_set('display_errors', 'on'); define('_PS_DEBUG_SQL_', false); but I see no error messages on any pages while ordering. The error log keeps collecting warning, but there are no errors on screen while going through the order process. Is this normal? Link to comment Share on other sites More sharing options...
Zenith Posted December 7, 2010 Share Posted December 7, 2010 Contact your host regarding the gd error, they should be able to help fix that.The division by zero relates to I think the image size of the homeSize image. In BO check that all image names have sizes assigned to them. (these two may be related as gd is used to create the resized images).Spanish is included and I've just checked it and all templates exist so that is not the issue I don't think.It does not look like these errors would effect the order process though. HmmmmIf you PM me your store URL I'll take a look for you quickly. Link to comment Share on other sites More sharing options...
Zenith Posted December 7, 2010 Share Posted December 7, 2010 I have turned errors on/* Debug only */ ini_set('display_errors', 'on'); define('_PS_DEBUG_SQL_', false); but I see no error messages on any pages while ordering. The error log keeps collecting warning, but there are no errors on screen while going through the order process. Is this normal? That's normal. It's a good thing if there are no errors on the screen.I didn't realize you aren't using the default template. The division errors are related to the template you are using. Link to comment Share on other sites More sharing options...
jayxflash Posted December 8, 2010 Share Posted December 8, 2010 Regarding the main issue, empty orders, for me was no solution but to reinstall and configure from scratch a new shop. Hope others will be more lucky than me. And... I really hope this error will not appear by nowhere how it's happened to others. Link to comment Share on other sites More sharing options...
Guest kumon Posted December 11, 2010 Share Posted December 11, 2010 I solved my problem.The template I am using must have been created using a previous version of Prestashop, not 1.3.2.3, which is the one I installed. The template came with a dump.sql to quickly recreate the look of the template demo. The database created by importing this dump.sql into MySQL was different from a fresh install of current version of Prestashop.Table ps_order_detail was missing two fields: reduction_percent and reduction_amount. This was causing the order detail not to be recorded and therefore Prestashop could not show the products in the orders.I fixed this by running the following SQL queries on the database:ALTER TABLE `ps_order_detail` ADD `reduction_percent` decimal(10,2) NOT NULL DEFAULT '0.00';ALTER TABLE `ps_order_detail` ADD `reduction_amount` decimal(20,6) NOT NULL DEFAULT '0.000000'; Link to comment Share on other sites More sharing options...
kirri_le Posted March 3, 2011 Share Posted March 3, 2011 I solved my problem.The template I am using must have been created using a previous version of Prestashop, not 1.3.2.3, which is the one I installed. The template came with a dump.sql to quickly recreate the look of the template demo. The database created by importing this dump.sql into MySQL was different from a fresh install of current version of Prestashop.Table ps_order_detail was missing two fields: reduction_percent and reduction_amount. This was causing the order detail not to be recorded and therefore Prestashop could not show the products in the orders.I fixed this by running the following SQL queries on the database:ALTER TABLE `ps_order_detail` ADD `reduction_percent` decimal(10,2) NOT NULL DEFAULT '0.00';ALTER TABLE `ps_order_detail` ADD `reduction_amount` decimal(20,6) NOT NULL DEFAULT '0.000000'; man, it really works!!! thank you a lot! Link to comment Share on other sites More sharing options...
petete2008 Posted January 25, 2013 Share Posted January 25, 2013 Yo tengo los campos 'reduction_percent' y 'reduction_amoun' en la tabla ps_order_detail y me sigue pasando que hay veces que los productos no me aparecen. Tengo la versión 1.3.6 Link to comment Share on other sites More sharing options...
Recommended Posts