Hi,
Thanks for the plugin. Unfortunately, the plugin doesn't do where he's meant for. Let me explain.
First of all, vendors should only be able to publish products in (a subcategory of) ROOT/Products. That can be achieved by setting the Vendors default root category, see attached screen dump (blue text). Furthermore, there's a main category for all vendors: ROOT/Vendors. The vendor specific category is then ROOT/Vendors/VendorX. This is also set in the global configuration of HikaMarket (same screen dump, orange text).
In your plugin, you're looking for the vendors root category (line 95), which in my case is set to ROOT/Products. And which is good! After all, vendors may only publish their products in ROOT/Products.
So, the plugin should not look for the vendors root category, but for the ROOT/Vendors/VendorX category and force that one. Only then will it be possible to relate the products to the vendors very own category. Am I right?
Best regards