Remove user from group if order is refunded/cancelled

  • Posts: 224
  • Thank you received: 8
6 years 5 months ago #293278

Hello,
I want to sell access to contents by assigniging users to different groups upon purchase,
some questions:

1.
What happens if an order is being refunded/cancelled?
Does Hikashop is smart enough to remove th euser form the assigned user group

2.
If not, can I achieve this using a Mass Action?
I've plaied with it but I dont' see a way to narrow down the action to a certain product, what I need looks like this:
if product X > order refunded or cancelled > remove user from group Y
If I choose "product" in the "data" tab, thne I dont' have the option to choose the order status as filter, and viceversa if I choose "order" in the data tab

3.
when a user is being assigned to a certain group upon purchase, it remains also assigned to the "Registered" gorup, right?

Thank you!

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 5 months ago #293279

Hi,

1. No the user group after purchase plugin doesn't handle that.

2. Mass action yes. You need to use the "order" data. For the "product X" product, you have the "order product column" filter you can use.

3. That's right.

Note that if you want something more advanced, you can use HikaSubscriptions:
www.hikashop.com/component/hikashop/product/cid-227.html
It's made to sell access to content, remove the access, etc. So it will do that without the need for a mass action / coding.

The following user(s) said Thank You: oloccina

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

  • Posts: 224
  • Thank you received: 8
6 years 5 months ago #293289

I followed your instructions, but when I go to set the action I only see an option "change the user group" which when selected does not show any additional setting.
What I need is to remove the user from a group to which he was assigned after purchase.



UPDATE:
none of the action options display other settings when selected, I see this error in console
Uncaught TypeError: Cannot set property 'innerHTML' of null
at updateMassAction (index.php?option=com_hikashop&ctrl=massaction:152)
at HTMLSelectElement.onchange (index.php?option=com_hikashop&ctrl=massaction:2329)

Thank you

Attachments:
Last edit: 6 years 5 months ago by oloccina.

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

  • Posts: 12953
  • Thank you received: 1778
6 years 5 months ago #293296

Hello,

Thank you for your feedback, can you set the "Action" tab option to "Change the user group" and save your mass action once. After saving your other options should be displayed through the "Action" tab.

Best regards,
Mohamed Thelji.

The following user(s) said Thank You: oloccina

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

  • Posts: 224
  • Thank you received: 8
6 years 5 months ago #293332

thanks, that wordked!

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

Time to create page: 0.083 seconds
Powered by Kunena Forum