Hi,
So what you're saying is that you want to add a user group to the user after the purhcase of a product.
If you want to do it for a specific product, you can use the "user group after purchase" setting of the product edition page in the Business edition to configure that.
If you want to do it regardless of what is bought, then a simple mass action via the menu System>Mass action with a trigger "when an order is updated", a filter for confirmed orders, and an action to add a user group will also allow you to do it without any code modification.
And if you really want to do it with code, I recommend not hacking directly in the core files of HikaShop, but instead, create a custom plugin of the group "hikashop" implementing the "onAfterOrderUpdate" trigger so that you can add your PHP code in there. That way, you won't loose your modification each time you update HikaShop.
You can read more about that in our developer documentation:
www.hikashop.com/support/documentation/6...r-documentation.html