Multiple groups or custom PHP upon purchase
10 years 11 months ago #215706
by cpaschen
Multiple groups or custom PHP upon purchase was created by cpaschen
-- HikaShop version -- : 2.6.0 business
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.?
-- Browser(s) name and version -- : various
We've got products set-up to add a User group to the customer/user after purchase of a product. (Via Custom Fields, User Group after...)
We need to be able to assign multiple groups (i.e. multi-select)
OR
We need to run some PHP code.
Is it possible to assign multiple groups?
If not, what is the best way to run PHP code to assign groups to the user?
I'm guessing a custom plugin.
However if a custom plugin, which trigger should be use to add the groups to the user AFTER the purchase has been 'confirmed'? [We have a LOT of orders with payment by check that are manually 'confirmed' later. We have to add the groups AFTER the confirmation process.]
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.?
-- Browser(s) name and version -- : various
We've got products set-up to add a User group to the customer/user after purchase of a product. (Via Custom Fields, User Group after...)
We need to be able to assign multiple groups (i.e. multi-select)
OR
We need to run some PHP code.
Is it possible to assign multiple groups?
If not, what is the best way to run PHP code to assign groups to the user?
I'm guessing a custom plugin.
However if a custom plugin, which trigger should be use to add the groups to the user AFTER the purchase has been 'confirmed'? [We have a LOT of orders with payment by check that are manually 'confirmed' later. We have to add the groups AFTER the confirmation process.]
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
10 years 11 months ago #215733
by Mohamed Thelji
Replied by Mohamed Thelji on topic Multiple groups or custom PHP upon purchase
Hello,
1. You'll only be able to assign your costumers to only 1 group after they purchased your product
2. In your case the solution will be to use the "onAfterOrderConfirm(&$order,&$methods,$method_id)" trigger. Here is the developer documentation for more information : www.hikashop.com/support/documentation/6...#onAfterOrderConfirm
1. You'll only be able to assign your costumers to only 1 group after they purchased your product
2. In your case the solution will be to use the "onAfterOrderConfirm(&$order,&$methods,$method_id)" trigger. Here is the developer documentation for more information : www.hikashop.com/support/documentation/6...#onAfterOrderConfirm
Please Log in or Create an account to join the conversation.
10 years 7 months ago - 10 years 7 months ago #230566
by notnilla
Replied by notnilla on topic Multiple groups or custom PHP upon purchase
I'd love to make the suggestion that in the next versions you allow users to be assigned to more than one group after purchase. It would greatly aid what we do with Hikashop.
Last edit: 10 years 7 months ago by notnilla.
Please Log in or Create an account to join the conversation.
10 years 7 months ago #230578
by nicolas
Replied by nicolas on topic Multiple groups or custom PHP upon purchase
Hi,
Thank you for your feedback.
Thank you for your feedback.
Please Log in or Create an account to join the conversation.
Time to create page: 0.164 seconds