Ovidiu H Posted November 12, 2015 Share Posted November 12, 2015 Hello. I want to let you know that we have some problem whit the new update of Prestashop 1.6.1.2. 1. When a client place an order, we can not see the products in the order only the client information, but no products. We have enabled the debugg mode and this error appear "Stock Available id_product_attribute is empty" Please see attachement Screenshot 2015-11-11 11.56.27.png 2. When we try to add a product to an existing order we get the same error ( "Stock Available id_product_attribute is empty" ) but not every time. Please see attachement Screenshot 2015-11-11 16.28.09.png 3. Sometime our Prestashop generate a hight I/O usage, I do not know if this can affect te functionality. Please see attachement Livechart.png If someone has any ideea how to fix this, please let me know. Thank you, very much! Link to comment Share on other sites More sharing options...
bellini13 Posted November 12, 2015 Share Posted November 12, 2015 Have you reported the issue to the Prestashop Forge? Some things to consider. 1) Does this product have stock? 2) Are you using advanced stock management or multistore? 3) Did you add this product manually from the back office, or did you import the product using CSV file or some module or migration service? 4) Is this a clean install of Prestashop, or did you upgrade from a previous version. If you performed an upgrade, then does this issue exist on a clean install of Prestashop? Link to comment Share on other sites More sharing options...
Ovidiu H Posted November 12, 2015 Author Share Posted November 12, 2015 Hello Bellini13 I have not reported this issue to Prestashop forge. To respond to you questions: 1. the product do not have stock or is suppose to not have any stock. 2 . We do not use advance stock managenent, but we DO use MULTISOTRE. 3 All the products are added manualy in back office. 4. We did update from a previous verion . We have not tested on a clean install. www.zootehnice.ro is the main sotre and www.europrodhd.ro is the secondary store. Link to comment Share on other sites More sharing options...
Ovidiu H Posted November 12, 2015 Author Share Posted November 12, 2015 I have deleted the product and the line 909 in Php my admin , but the same error appear. I will try to clear the cache. But still the problem is there. Link to comment Share on other sites More sharing options...
bellini13 Posted November 13, 2015 Share Posted November 13, 2015 i would suggest you report the issue to the Forge Link to comment Share on other sites More sharing options...
tomas.stancl Posted December 19, 2015 Share Posted December 19, 2015 Hi, I have the same problem. It make error 505 in last step of order. Do you have solution for this? LOG: *ERROR* 2015/12/18 - 15:25:16: Property StockAvailable->id_product_attribute is empty at line 909 in file classes/ObjectModel.php Thank you. Link to comment Share on other sites More sharing options...
Ovidiu H Posted December 22, 2015 Author Share Posted December 22, 2015 Our problem was fixed by someone that we work whit. The problem was in the ps_stock_available table in database. Some records were missing after we made the upgrade to Prestashop 1.6.1.2. Our guy has created a script (stock_available_fix.php) to find and restore missing records. The number of records in the table are 2741 vs 2002 before the fix. I believe the problem was rather related to old products with ID < 700. I hope that this can help you. 1 Link to comment Share on other sites More sharing options...
Sashok Posted February 3, 2016 Share Posted February 3, 2016 Hi, I have the same problem. It make error 505 in last step of order. Do you have solution for this? LOG: *ERROR* 2015/12/18 - 15:25:16: Property StockAvailable->id_product_attribute is empty at line 909 in file classes/ObjectModel.php Thank you. It is a bug in file Core/Business/Stock/Core_Business_Stock_StockManager.php at line 126 you should have like this: $stockAvailable->quantity = $stockAvailable->quantity + $delta_quantity; $stockAvailable->id_product = (int)$product->id; $stockAvailable->id_product_attribute = (int)$id_product_attribute; $stockAvailable->update(); 4 Link to comment Share on other sites More sharing options...
thrillmetoo Posted March 19, 2016 Share Posted March 19, 2016 dear Ovidiu H, could you send me that script (stock_available_fix.php) that you mentioned? It seems I have the same problem. Link to comment Share on other sites More sharing options...
MikePrinceOliver Posted September 29, 2016 Share Posted September 29, 2016 Same problem here. Can you send us the script please? Link to comment Share on other sites More sharing options...
chafox Posted December 12, 2016 Share Posted December 12, 2016 No script needed, just as Sashok said : It is a bug in file Core/Business/Stock/Core_Business_Stock_StockManager.php at line 126 you should have like this:$stockAvailable->quantity = $stockAvailable->quantity + $delta_quantity;$stockAvailable->id_product = (int)$product->id;$stockAvailable->id_product_attribute = (int)$id_product_attribute;$stockAvailable->update(); It worked fine for me, Charlotte 3 Link to comment Share on other sites More sharing options...
AmirRzd Posted April 19, 2017 Share Posted April 19, 2017 It is a bug in file Core/Business/Stock/Core_Business_Stock_StockManager.php at line 126 you should have like this: $stockAvailable->quantity = $stockAvailable->quantity + $delta_quantity; $stockAvailable->id_product = (int)$product->id; $stockAvailable->id_product_attribute = (int)$id_product_attribute; $stockAvailable->update(); Thank you. It worked for me too (PrestaShop 1.6.1.5). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now