melo4kids Posted March 23, 2018 Share Posted March 23, 2018 Hello, i need some help products which are not in stock or out of stock, it shows Add to Cart button, I want it to be desable. Can some one help please I have prestashop 1.7 my site : www.melo4kids.fr Thanks Link to comment Share on other sites More sharing options...
musicmaster Posted March 23, 2018 Share Posted March 23, 2018 Have you set your preferences for products correctly? Link to comment Share on other sites More sharing options...
melo4kids Posted March 24, 2018 Author Share Posted March 24, 2018 yes, the thing is when i only have one product in stock and i add it to the cart, the button "add to cart" doesent change to out of stock, It changes only if the order is compleated. I would like it to change if we add the last product to the cart in to "out of stock". do you have any ideas? I only sell on quantity of a product. and its anooing when people try to add to the cart products that I only have one in stock The cart goes like this img I add the las product to cart so the last produt is gonne, and then the "add to cart" button does not disapperas I hope you understand do to my bad inglish Thanks for replying Link to comment Share on other sites More sharing options...
melo4kids Posted March 24, 2018 Author Share Posted March 24, 2018 affter i try to add to cart it goes like this Link to comment Share on other sites More sharing options...
musicmaster Posted March 24, 2018 Share Posted March 24, 2018 Can you be more specific? Every webshop has numerous abandoned carts. How do you want to deal with that? Link to comment Share on other sites More sharing options...
melo4kids Posted March 25, 2018 Author Share Posted March 25, 2018 for the moment since i only have very litlle stock like one ore two peaces of a model, i will mysel deleat de abandon carts. later on, when i have a larger stock, i will leave the carts abandon for 7 days only. the thing is that i hate the fact that we can still clic on the button if we dont have any in stock. do you know a code for that? or at least change de "add to cart" to "its the last one" or something like that? Link to comment Share on other sites More sharing options...
melo4kids Posted March 25, 2018 Author Share Posted March 25, 2018 or instead of this box add a box in the same style, but instead of being empty in "Quntity (Quantité)" have something writtin like "were are sorry, it was the last one". I think is the best way for the moment. what do you think? Is it possible? Link to comment Share on other sites More sharing options...
musicmaster Posted March 25, 2018 Share Posted March 25, 2018 Adding a text to the page that this is the last product is rather easy. You should just add text to product.tpl: {if $product->quantity == 1}This is the last product{/if} Having the same thing in the category page (product-list.tpl) might be a bit more difficult. If you want a check for the content of your carts you should put a database query in controllers/front/productController.php and let it transfer a Smarty flag to product.tpl. So that is a more difficult to do. Link to comment Share on other sites More sharing options...
musicmaster Posted March 25, 2018 Share Posted March 25, 2018 There is also an option in Prefences->Products 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