Ragonz Posted August 19, 2020 Share Posted August 19, 2020 I wonder if its possible to assign client groups to customers if they purchase a specific addon/configurable option somthing like if configoption1435=Yes set client group=3 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 19, 2020 Share Posted August 19, 2020 38 minutes ago, Ragonz said: I wonder if its possible to assign client groups to customers if they purchase a specific addon/configurable option yes - Kian has previously published a couple of related hooks, but the one more relevant to your situation is the one that assigns client groups based on product ordering. so as written, it's only reacting to purchases of specific products - if you wanted to expand that to reacting to config options and/or addons, then that's going to require more queries to check whether the order contains such items - no doubt Kian will be able to expand the hook to meet your need. 0 Quote Link to comment Share on other sites More sharing options...
Ragonz Posted August 19, 2020 Author Share Posted August 19, 2020 Oh awesome, thanks for that Brian. I did a search on the forums but must be blind. @Kian would you know how to expand your hook to allow checking for configurable options and product addons? 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted August 20, 2020 Share Posted August 20, 2020 17 hours ago, brian! said: yes - Kian has previously published a couple of related hooks, but the one more relevant to your situation is the one that assigns client groups based on product ordering. so as written, it's only reacting to purchases of specific products - if you wanted to expand that to reacting to config options and/or addons, then that's going to require more queries to check whether the order contains such items - no doubt Kian will be able to expand the hook to meet your need. That sounds brilliant. The client groups are somehow useless with the limited options today and no way to automate the assigment. That certainly makes sense, assign groups based on a specific product they purchased. I hope WHMCS takes more attention to adding functions to client groups in the future. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 20, 2020 Share Posted August 20, 2020 14 hours ago, Ragonz said: Oh awesome, thanks for that Brian. I did a search on the forums but must be blind. in fairness, I don't think he's published that here... I just remember seeing them posted and your question fired a synapse somewhere. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted August 20, 2020 Share Posted August 20, 2020 17 hours ago, Ragonz said: @Kian would you know how to expand your hook to allow checking for configurable options and product addons? What do you mean? Assign customers to group based on configurable options or product addons? 0 Quote Link to comment Share on other sites More sharing options...
Ragonz Posted August 20, 2020 Author Share Posted August 20, 2020 Yep assign customers to client groups if they choose a particular value within a configurable option or choose a particular product addon 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted August 20, 2020 Share Posted August 20, 2020 Ouch, it will be boring as hell 😪 I'll let you know when it's ready 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted August 20, 2020 Share Posted August 20, 2020 I updated both versions of the script to support product addons and configurable options. For configurable options you can assign client to group in two different ways. I show you an example. Let's suppose we have the following configurable option: Configurable Option: Backup Space (config ID 5) Option 1: 10 GB (option ID 70) Option 2: 20 GB (option ID 71) Option 3: 30 GB (option ID 72) You can assign customers to, say, client group "Elvis" group based on: Any match. It doesn't matter what option I select. It can be 10, 20 or 30 GB. I still go to "Elvis" Specific match. You can assign me to "Elvis" only if I select specific options. For example only if I select 30 GB. Selecting 10 or 20 GB has no effect Here you can find detaild instruction the script. If it doesn't work let me know. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.