archyjoe Posted January 28, 2021 Share Posted January 28, 2021 Hi, Some customers added the produts in their cart to buy later and then they look at their cart after a while, other customers already bought the last stocks of this products color. So, exactly at this moment customer with product already in their basket cant see which color out of stock. n Prestashop 1.6, You can easily see which product is out of stock. But 1.7, not. ... So sad Link to comment Share on other sites More sharing options...
JBW Posted January 28, 2021 Share Posted January 28, 2021 You could adjust controllers\front\CartController.php 1 Link to comment Share on other sites More sharing options...
archyjoe Posted January 28, 2021 Author Share Posted January 28, 2021 After all the pain, it finally worked :) Yep. W O R K E D 🤣 You are a real magician. Thank you so much man. Thank you.. Link to comment Share on other sites More sharing options...
joseantgv Posted January 28, 2021 Share Posted January 28, 2021 hace 13 horas, JBW dijo: You could adjust controllers\front\CartController.php Could you do a PR? https://github.com/PrestaShop/PrestaShop Link to comment Share on other sites More sharing options...
JBW Posted January 29, 2021 Share Posted January 29, 2021 As soon as I find time. Opening issue and PR is a lot overhead for this mini code change Link to comment Share on other sites More sharing options...
joseantgv Posted January 29, 2021 Share Posted January 29, 2021 hace 46 minutos, JBW dijo: As soon as I find time. Opening issue and PR is a lot overhead for this mini code change Do you want me to do it, linking this thread? 1 Link to comment Share on other sites More sharing options...
JBW Posted January 29, 2021 Share Posted January 29, 2021 39 minutes ago, joseantgv said: Do you want me to do it, linking this thread? Sure you are welcome to do so. I think every PR making this project better is highly appreciated. It's a pitty that such "features" got lost in the transition from 1.6 to 1.7. and have to be re-established. 1 Link to comment Share on other sites More sharing options...
joseantgv Posted January 29, 2021 Share Posted January 29, 2021 (edited) Be careful with this modification, it throws an error if the product without stock doesn't have combinations/attributes. EDIT: Check this https://github.com/PrestaShop/PrestaShop/pull/23059/files Edited January 30, 2021 by joseantgv (see edit history) Link to comment Share on other sites More sharing options...
archyjoe Posted January 29, 2021 Author Share Posted January 29, 2021 59 minutes ago, joseantgv said: Be careful with this modification, it throws an error if the product without stock doesn't have combinations/attributes. Presta 1.7 automatically hide products which are out of stock, do you think it would be a problem this way ? Link to comment Share on other sites More sharing options...
JBW Posted January 29, 2021 Share Posted January 29, 2021 @joseantgv I have now added a pull request to your issue Link to comment Share on other sites More sharing options...
joseantgv Posted January 30, 2021 Share Posted January 30, 2021 (edited) hace 14 horas, JBW dijo: @joseantgv I have now added a pull request to your issue Thanks. But this PR throws an error if the product without stock doesn't have attributes. I didn't send the PR because I wanted to test it better. It's necessary to check if $product['attributes'] is set. EDIT: Check this https://github.com/PrestaShop/PrestaShop/pull/23059/files Edited January 30, 2021 by joseantgv (see edit history) Link to comment Share on other sites More sharing options...
joseantgv Posted January 30, 2021 Share Posted January 30, 2021 (edited) hace 20 horas, archyjoe dijo: Presta 1.7 automatically hide products which are out of stock, do you think it would be a problem this way ? Check this https://github.com/PrestaShop/PrestaShop/pull/23059/files Edited January 30, 2021 by joseantgv (see edit history) Link to comment Share on other sites More sharing options...
JBW Posted January 30, 2021 Share Posted January 30, 2021 4 minutes ago, joseantgv said: Thanks. But this PR throws an error if the product without stock doesn't have attributes. No, I have added a check 1 Link to comment Share on other sites More sharing options...
joseantgv Posted January 30, 2021 Share Posted January 30, 2021 hace 1 minuto, JBW dijo: No, I have added a check Sorry, didn't see it 🤦♂️ 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