Hi,
1. This is possible:
- Registered user pay "Subscription" and is moved to Sub1 usergroup
- Sub1 usergroup can buy a "Free Vendor Subscription" that will add them to the "Vendor" usergroup (the usergroup setted to automatically register them as HikaMarket Vendors)
However, there is no mechanism to have the vendor subscription expire when the sub1 subscription expires. The vendor subscription will expire base on its own expiration period.
2. That's right. Partners will be paid by the main vendor. Vendors won't see the commissions of the partners. Vendors only see a sub order of the main order which only contain their own products, while the partner is linked to the main order.
Now, some page could be developed to display the commissions of the main orders but then you have to handle the fact that several vendors can be assigned to the same order (because there are products from different vendors in the order). And in that case, you either forbid the sale of products from different vendors in the same order, or you need to calculate the share of the partner commission for each vendor (so that's more development).
3. There is no mechanism to activate the affiliate program or deactivate it based on the user groups of the customer.
You could potentially setup a mass action, checking every hour for the users groups to change the value of the column in the hikashop_user table to activate/deactivate the table. That however will be problematic once you start having a few thousands of users as it could be a lot of data to process for the mass action. A development would be necessary to make it viable in the long run.
5.a It's basically this plugin from HikaSerial that you need to setup:
www.hikashop.com/support/documentation/1...ugins-coupongen.html
And you want to attach it to a "pack" and attach the "pack" to the product. That way, when the customer purchase the product, a serial is generated by the pack which triggers that coupon plugin to generate the coupon.
5.b So far, there is no documentation on this. The only page of information I could find about this is here but it's written in French:
www.hikashop.com/forum/18-support-en-fra...ne-souscription.html
Basically, you'll want to implement the trigger onAfterSubscriptionsExpire(&$expired_subscriptions, $plans, $users) where $expired_subscriptions is an array of subscriptions which just expired, $plans is an array of plans which generated these subscriptions and $users is an array of users affected by these expirations.
I would recommend to actually look at the code in the file plugins/hikaserial/groupsubscriber/groupsubscriber.php which is the HikaSerial plugin which handle adding a user group when a subscription is created and removing it when the subscription expires.