JotaCe Posted January 22, 2015 Share Posted January 22, 2015 I hope someone can help me. My problem is that I know what I want to do, but my php knowledge is near zero, so I do not know how to do it. I would like to edit some file (I guess cart.php or cartcontroller.php, but maybe it is another one) to get following: I have a "special" category defined. Let us say "category ID=5". I want to stablish a minimal quantity of products of that category to buy, and I have thought to do it the following way: I want the cart controller (or whatever other file) to check the amount of products of cat. #5 in the cart. If qty>"x", then ok. Else, a message should appear, of the type: "cat. 5 products qty must be greater than x". And the cart is not processed until this is corrected by customer. I see that cartcontroller.php does something similar to that for products with minimal quantity established, so this should be very similar. The difference here is that it has to check the total quantity of the products belonging to category "x". Sadly, I do not know how to implement this in the code. I would be very grateful is someone can help me! Link to comment Share on other sites More sharing options...
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 account
Already have an account? Sign in here.Sign In Now