Jump to content

Restrict customers from purchasing from only 1 subcategory at a time


Recommended Posts

Hi guys, this may seem a bit odd, but I need a way to prevent customers from adding products to their basket from more than one category.

So if they add a product from category-1, they cannot add one from category-2 without either emptying the basket, or completing the purchase.

I'm guessing it might be easiest to detect the category from which the product(s) added come, and then restrict/hide the rest of the categories, but I'm not sure how to do this.

Any ideas would be greatly appreciated.

Thanks :)

Ryan

Link to comment
Share on other sites

I think you will have to do some coding inside of the blockcategory module.
/modules/blockcategories/blockcategories.php

In blockcategory module, if the cart is empty, then show all categories as usual, but if there is anything in cart, you only show the category of products in cart.

There is also something else you need to watch out.
1. You can not add one product into mutiple categories
2. All featured products must be from the same category.

Link to comment
Share on other sites

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

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...