Allow users to be assigned to 2nd user group based upon product variants

  • Posts: 13
  • Thank you received: 2
  • Hikamarket Multivendor Hikaserial Standard Hikashop Business
3 years 8 months ago #322490

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.20
-- PHP version -- : 7.2.32
-- Browser(s) name and version -- : N/A
-- Error-message(debug-mod must be tuned on) -- : N/A

Hello! Users can be assigned to a user group after purchase based upon the base product settings. If, within a product variant a user is set to be assigned to a different user group, that setting overwrites the user group after purchase setting in the base product. We have a use case, where we could use an alternate user group assignment after purchase set in a product variant.
The base product user group after purchase is used to add a user to a group that is used by downstream systems, Moodle, to assign users to classes they have purchased.
If we could have the ability to set a second user group based upon the product variant settings, we could use that setting to do things we cannot do otherwise because the system relies on the base product group after purchase setting to assign users to classes they've bought.
We are using HikaShop with EasyProfile, Joomdle and Moodle. They ability to set a second user group based upon the product variant would allow us to display or hide appropriate fields based upon the product variant selection.

Thank you!

Please Log in or Create an account to join the conversation.

  • Posts: 81511
  • Thank you received: 13066
  • MODERATOR
3 years 8 months ago #322497

Hi,

One way you could do it is to use a mass action with a filter on the "order_product_code" with the code of a variant and a filter on the order_status, a trigger "on after an order is updated", and an action "change the user group" so that you could set the variant user group with the mass action and then user the "user group after purchase" setting of the main product only.

Besides that, the only solution would be some custom development.

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum