Hi, Jerome,
Ok, lets make a bit brainstorming
As limitations are based on user group ( sample: Author- 3 items allow, Editor - 30 items, publisher-100 items and so on) it would be logic, that if administrator change the users group from Editor to Author , then only 3 first in list items stays published and all the rest became inactive( vendor sees them, but they "grey" and inactive (color change for clarity) or hikamarket already has option "products to aprove", so if it is posipble to make that after users group change all items which are under limitations become "not approved/ inactive", then vendor will not be able to make the publish by himself. . The items sorting in vendors front-end have (all, items, variants ) + should appear extra option "inactive". This will allow user to see how many he has items in list (both active and inactive) and it will be useful information which membership he should buy as membership relates to item quantity.
other solution (I like this more)->
after users group is changed in his control panel / products tab appear notification :" Your membership changed, which allow you to have x items. Please select x items to stay active in next 24 hours (ends: data/ time ) or after this term system will automaticly make this random choise for you." (system leave active x items from list, all the rest become inactive after 24 hours, if vendor do not make his choice with CONFIRM). The time term (24 hours) could be made that in beck-end administrator enters his preferenced time in hours. In product list near each product the check box appear to select and the button "confirm" (the place for button I would suggest near the notification or even inside notification border). The select limitation according group limitations (if Autors group allows to have 3 items, then user can select to confirm only 3 items). After press confirm , slected items stays active, all the rest inactive ,but visible. Near inactive items could be notification something like " if you would like to activate inactive items, please change your memebership + link to membership page (selected menu:hikashop category, where vendor can buy the membership)
An illustration of the solution attached.
Whats your opinion on this?
P.S.
Jerome: " If he want to create a product but the limit is reached, the action is refused. "
- the hikamarket that already do, if user reached his group llimit system do not allow to add more. But the system do nothing, if the user already has added more items earlier (when his users group allowed him to have more items ). After group change to to less item allow, the users items stays published (even is the list is more then new group allows), but he can not add more.
Jerome: "Performing an action on the products or vendor should be done when the membership changed, so it would be a plugin triggered by the membership component ; or a plugin plugged on the vendor modification to check if its groups are modified (good and flexible solution but more complex to implement)"
I supose vendor group modification should be checked, as limitations are based on user(vendor) groups, then to change limits to vendors, will be enough to change the vendors user group.
Regards,