Multiple prices based on ACL

  • shashankkouloorkar
  • Topic Author
7 years 10 months ago #257497

-- url of the page with the problem -- : skillsalliance.com.au/store/
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.4.5
-- Browser(s) name and version -- : Firefox

I have created a field in Hikashop Custom Views named- "Club Member List" under the table- "Address". The field has over 4000 entries and the first option is "Other". When "Other" is chosen, the user needs to pay $90 AUD and when any other option is chosen the user has to pay $0 AUD. I have NOT yet created multiple prices and the groups. I plan to create two groups- "Free" and "Paid". Choosing "Other" from "Club Member List" needs to place the created user under the group- "Paid" and choosing any other field would place the user under the group "Free". Would that be possible with the Hikashop "Mass actions"? If yes, please help me with the steps. Many thanks!

I have sent the credentials to the site (If you need it) via an email with the subject line- "Skills Credentials"

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
7 years 10 months ago #257506

Hi,

I would recommend to use a custom user field instead of a custom address field. Then, you can use a mass action with the trigger after a user is updated a filter on the value of the custom field, and an action "change the user group" in your mass action so that the user group is changed based on the user selection in that field.
Then, you can configure two sets of shipping methods, or two sets of payment methods, one for each user groups with different prices so that the price paid will reflect the user group the user is in.
You can then change again the user group after the order with another mass action on the trigger "after an order is updated" and a filter on the order_status and another one on the user group of the user.

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

  • shashankkouloorkar
  • Topic Author
7 years 10 months ago #257566

Hello Nicolas,

For some reason, the third party- registration form that is integrated with the Hikashop form doesn;t shoe the fields created under the table- "User". Is there anyother way?

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
7 years 10 months ago #257588

Hi,

The problem is that if you try to use a custom address field instead of a custom user field, the mass actions system cannot use the action to change the user group of the customer and the after an address is created trigger. And with the "after a user is created/updated" trigger, the address isn't yet generated in the database so you can't use an address filter on it.
Also, it will mess the user groups of the customer when the customer has several addresses and/or when he manages his addresses on the frontend.

So I don't see another way besides developing a custom plugin to handle that.

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

  • shashankkouloorkar
  • Topic Author
7 years 10 months ago #257804

I have managed to get the field to be displayed in the form under the table "User" but, I'm struggling with the mass actions. Could you please help me set that up? I want the users to pay $0.00 AUD when they choose the value that is different from "Other" from the field- "Club Membership". When "other" is chosen, they pay $90.00. I am unable to figure it out. Many thanks, Nicolas!

Attachments:
Last edit: 7 years 10 months ago by shashankkouloorkar. Reason: Added an attachment

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
7 years 10 months ago #257815

Hi,

I would rather replace the user group in your mass action and configure that "free" user group as a child of the "registered" user group so that it would have the same access rights by default.
Then, you could configure the price in the products for all the user groups except the "free" one and that should do the job.

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

  • shashankkouloorkar
  • Topic Author
7 years 9 months ago #258913

Hello Nicolas,

Happy new year! And, sorry for not getting back to you for weeks because, I was on vacations. I did the EXACT SAME thing as you'd suggested and sadly, it doesn't work. Could you please check it for me? I had sent email with subject line- "Skills Credentials" about 3 weeks ago. I can send it again if you want me to.

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

  • Posts: 82723
  • Thank you received: 13338
  • MODERATOR
7 years 9 months ago #258994

Hi,

So what do you mean by "it doesn't work" ?
I checked on your website, and when I try to register through the registration module you're using, I'm redirected to that page and no user account is created: take.ms/Rh9vn

However, when I do it through the HikaShop registration page skillsalliance.com.au/store/index.php/co...l=user&task=register I'm successfully registered AND the mass action properly add my user account to the "free" user group:
take.ms/KQjmC

So as far as I can see the process in HikaShop works just fine, and the errors you get when you try to register through the other extension registration is because it's using the HikaShop fields but only displaying some of them and not others which are required.
So the problem is with the integration. It should display all the fields that are enabled. Or you should disable the ones you don't want to use.

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

Time to create page: 0.050 seconds
Powered by Kunena Forum