[Skip to main content](#vessel-content)

#   Multiple groups or custom PHP upon purchase

##

- **[cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile")**
- [![cpaschen's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12420-cpaschen "View cpaschen's Profile") Topic Author
- [ Offline](/forum/user/12420-cpaschen)

Less More

- Posts: 196
- Thank you received: 6
-
-
-
- [](http://www.paschencommunications.com)
-

11 years 1 month ago [\#215706](#215706) by [cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile")  *[Multiple groups or custom PHP upon purchase](/forum/31-development/879544-multiple-groups-or-custom-php-upon-purchase#215706 "-- 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'? &#91;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.&#93;")* was created by *[cpaschen](/forum/user/12420-cpaschen "View cpaschen's Profile")*

-- 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.]

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3OTU0NC1tdWx0aXBsZS1ncm91cHMtb3ItY3VzdG9tLXBocC11cG9uLXB1cmNoYXNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

11 years 1 month ago [\#215733](#215733) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Multiple groups or custom PHP upon purchase](/forum/31-development/879544-multiple-groups-or-custom-php-upon-purchase#215733 "-- 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'? &#91;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.&#93;")*

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(&amp;$order,&amp;$methods,$method_id)" trigger. Here is the developer documentation for more information : [ www.hikashop.com/support/documentation/6...#onAfterOrderConfirm](http://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#onAfterOrderConfirm)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3OTU0NC1tdWx0aXBsZS1ncm91cHMtb3ItY3VzdG9tLXBocC11cG9uLXB1cmNoYXNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[notnilla](/forum/user/32246-notnilla "View notnilla's Profile")**
- [![notnilla's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32246-notnilla "View notnilla's Profile")
- [ Offline](/forum/user/32246-notnilla)

Less More

- Posts: 65
- Thank you received: 3
-
-

10 years 8 months ago -  10 years 8 months ago [\#230566](#230566) by [notnilla](/forum/user/32246-notnilla "View notnilla's Profile")  Replied by *[notnilla](/forum/user/32246-notnilla "View notnilla's Profile")* on topic *[Multiple groups or custom PHP upon purchase](/forum/31-development/879544-multiple-groups-or-custom-php-upon-purchase#230566 "-- 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'? &#91;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.&#93;")*

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 8 months ago by [notnilla](/forum/user/32246-notnilla "View notnilla's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3OTU0NC1tdWx0aXBsZS1ncm91cHMtb3ItY3VzdG9tLXBocC11cG9uLXB1cmNoYXNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

10 years 8 months ago [\#230578](#230578) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Multiple groups or custom PHP upon purchase](/forum/31-development/879544-multiple-groups-or-custom-php-upon-purchase#230578 "-- 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'? &#91;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.&#93;")*

Hi,

Thank you for your feedback.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3OTU0NC1tdWx0aXBsZS1ncm91cHMtb3ItY3VzdG9tLXBocC11cG9uLXB1cmNoYXNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.050 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
