So this is more of a question for anyone familiar with Magento since I’m still somewhat new to it.
So I’m using a CED commerce multi vendor extension. When a vendor wishes to add a product, they’re given the category tree. I don’t want people being able to add products in every category however, which means I’m looking for a way to limit each product to one single category. I figured the easiest way to do this would be to write a quick script that will disable all other checkboxes next to each category upon one of them being chosen. And then enabled again if the one they chose is unchecked.
I would not like it to be client sided though so that users can bypass it. So would it best to add something to the list.phtml from the template or write a script and have the page load it?
So changing them to radio buttons could work, except the products wouldn’t end up in any parent categories, only the exact one that’s chosen.
Maybe if I were to remove all checkboxes, and somehow force the lowest subcategories to still have radio buttons, then once the product is added it will show up in all parent categories of the subcategory
I understood this to be a one-to-many, one-to-one relationship i.e.
Each parent category can have many products.
Each product can belong to only one parent category.
If so, the products should not belong in the same radios as the parent categories. In fact, probably only the parent categories would need to be radios
The extension allows a product to be added to as many parent categories as you wish. Each parent category being a radio would work, however the vendor could still add their product to multiple subcategories in the parent they choose.
Parent 1-
Sub 1 > Child 1 or Child 2
Sub 2 > Child 1 or Child 2
Parent 2-
Sub 1 > Child 1 or Child 2
Sub 2 > Child 1 or Child 2
I’d like it so that the vendor can only choose one Child category within a sub of a parent. Or is this not what you meant?