shopmaker Posted June 20, 2020 Share Posted June 20, 2020 Cubecart version 6.2.4 PHP version 7.2.31 I have an issue with my store. I've just discovered that for products with options the stock levels are being ignored and a customer can enter any quantity and purchase them. For products without options the stock level is being respected and an over-quantity order is correctly limited to whatever the stock level is. On the options pages I have checked "Use stock level" next to the relevant options in the matrx, with the stock level entered there too. I'm not sure if this is relevant, but I'm also getting the following error recurring in the error_log: [20-Jun-2020 15:45:39 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/tvcommco/public_html/store/classes/db/database.class.php on line 692 [20-Jun-2020 15:45:46 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/tvcommco/public_html/store/classes/db/database.class.php on line 692 [20-Jun-2020 15:47:08 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/tvcommco/public_html/store/classes/db/database.class.php on line 692 Any help gratefully received! Thank you, Andy. PS. I can edit PHP but I have no clue how it works Link to comment Share on other sites More sharing options...
bsmither Posted June 20, 2020 Share Posted June 20, 2020 To clear the error, please implement: https://github.com/cubecart/v6/issues/2433 As for the enforcement of stock levels being ignored for products in the Options Matrix, I am sure this problem would have been found and fixed. Yet, I cannot find the bug report. I will explore further. Link to comment Share on other sites More sharing options...
bsmither Posted June 21, 2020 Share Posted June 21, 2020 I am not able to replicate this* - a zero-level stock on a specific option combination as specified in the Options Matrix table - cannot be added to the shopping basket. Comparing the code between CC624 and CC629 shows only this issue (*the edits covered which I have implemented) that may have an effect: https://github.com/cubecart/v6/issues/2490 specifically catalogue.class.php, near line 1373. These edits will show up in CC6210. Continuing to look. Link to comment Share on other sites More sharing options...
bsmither Posted June 21, 2020 Share Posted June 21, 2020 Please verify that in admin, Editing the Product, General tab, "Use Stock Level" is checked. It seems that honoring the Options Matrix table's "Use Stock Level" setting for each option combination is ignored if the main "Use Stock Level" is not checked. (But you would think it is because there is an enforcement being tested.) Link to comment Share on other sites More sharing options...
shopmaker Posted June 21, 2020 Author Share Posted June 21, 2020 Ahh, thank you so much. I must have turned off the "master" stock level check box at some point and it's propagated through the listings. Regarding the PHP error, I'm sorry but I don't understand the fix that is required from the forum posts you linked to. Andy. Link to comment Share on other sites More sharing options...
bsmither Posted June 21, 2020 Share Posted June 21, 2020 That's fine. When you (eventually) upgrade to CC6210, those fixes will be in place. Link to comment Share on other sites More sharing options...
shopmaker Posted June 21, 2020 Author Share Posted June 21, 2020 Thank you, much appreciate your help Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.