Add user to mupliple User group after purchase

  • Posts: 100
  • Thank you received: 2
5 years 11 months ago #292297

-- HikaShop version -- : 3.4
-- Joomla version -- : 3.8.3
-- PHP version -- : 5.6.33

Hi

I am needing to add a user to more than one user group after purchase.
On the product page it only allows you to select 1 user group, (is it possible to change the ratio buttons to check boxes so that multiple can be selected)

Lets say I have 3 groups A, B and C

Scenario 1
I set Product A to add the user to Group A after purchase
I then created a Mass action so that if an order contains product A it must add the user to Group B

Result Mass action over rider product user not added to A only added to B

Scenario 2
Set Product A not to add to any user group
Set Mass Action to add user to Group A and B

Result User only added to one of the two groups, (manually clicking process then ads them to the other group.

Scenario 3
I set Product A to add the user to Group A after purchase
I then created a User mass action based on user updating profile, I set it up that the filter states user must be in Group A
Action - Add to group B

Result
All users are added to group B on registration (Filter is being ignored)

Please I am running out of ideas.

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
5 years 11 months ago #292298

Hi,

Here is a simple way, without any mass action or coding:
- create a product with one characteristic with one value (and thus one variant) and select the group B in the "user group after purchase" of that product
- add that option as option of your main product, where you will select the group A in the "user group after purchase".
That way, you'll get a mandatory option to your product which will add the second user group.
Also, you can use CSS to hide the option selector on the product page if you don't want to have it displayed on the product page.

An alternative would be to create a user group C which would have all the rights of group A and group B. In that case, you could simply select group C in your product and be done with it.

Changing the radios to checkboxes could be possible, but it would require also modifying the code of the user group after purchase plugin to support several groups which isn't the case now. So you would need a developer to help you with that.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum