Jan Fromm Posted May 31, 2022 Share Posted May 31, 2022 @kongondo No big deal, just FYI: Found out that the checkbox »Enabled« (If unchecked, customers will not be able to buy this product.) on shop/products/edit has no impact at all. You can buy this product, no matter if checked or not. Link to comment Share on other sites More sharing options...
kongondo Posted June 3, 2022 Share Posted June 3, 2022 Thanks for reporting. I'll look into it. Link to comment Share on other sites More sharing options...
kongondo Posted June 4, 2022 Share Posted June 4, 2022 Hi @Jan Fromm, This has now been fixed. Products or variants that are not enabled for selling cannot be added to the basket. However, please note that since Padloper does not involve itself with the frontend display of products, developers will need to exclude such non-enabled products from frontend display, if they wish to. For instance: <?php // please note the below will also find parent product of variants! // FIND non-enabled products and variants $nonEnabledProductsAndVariants = $padloper->find("template=product|variant,stock.enabled=0"); // FIND enabled products and variants $enabledProductsAndVariants = $padloper->find("template=product|variant,stock.enabled=1"); I also fixed a bug that allowed out-of-stock items to be added to the basket/cart. Please note that out-of-stock is only applicable to products/variants that track their inventory (Product Settings Tab) AND that don't allow overselling/backorders. 1 Link to comment Share on other sites More sharing options...
Jan Fromm Posted June 9, 2022 Author Share Posted June 9, 2022 Hi @kongondo, I have just tested this with the latest update. I can still add non-enabled products to the cart and order them. Link to comment Share on other sites More sharing options...
kongondo Posted June 9, 2022 Share Posted June 9, 2022 Hi @Jan Fromm, Apologies, I botched the build. This has now been fixed. I'll be implementing a better versioning system to avoid things like this. Please download and test again. Thanks. Link to comment Share on other sites More sharing options...
Jan Fromm Posted June 9, 2022 Author Share Posted June 9, 2022 No worries – works perfectly now. Thanks! Link to comment Share on other sites More sharing options...
Jan Fromm Posted June 10, 2022 Author Share Posted June 10, 2022 One more thing – What happens now is when you enable variants, the product gets disabled. 1) Content tab: Check enabled -> Save 2) Settings: Enable Product Variants: Yes -> Save 3) Content tab: Checkbox disappeared 4) Settings: Enable Enable Product Variants: No -> Save 5) Content tab: Checkbox re-appeared, but is unchecked Link to comment Share on other sites More sharing options...
kongondo Posted June 10, 2022 Share Posted June 10, 2022 Hi @Jan Fromm, That is the expected behaviour because variants are products in themselves. So, if you enable variants, it means you will in effect have several products (the variants) that can be enabled independently of each other. At this point, the main product's enabled status does not come into play. However, other shared fields are still relevant, e.g. properties, tax, etc. Hope this makes sense. 1 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