Newton Posted February 16, 2021 Share Posted February 16, 2021 Hello 🙂 Is there a way in WHMCS to make purchasing an addon a required step in order to pick another addon. I'm sure I'm being clear, so here is an exemple : Addon A is "Server configuration" Addon B is "Server management" For the client to be able to order Addon B (Server management), he needs to also have Addon A in his cart. I can't find a good way to do that... Maybe there is another way to takle that problem? Thanks for your help ! 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted February 19, 2021 Share Posted February 19, 2021 I don't think that is possible out of the box. What could be done is checkout validation hook and if trying to add addon B without A produce an error. ShoppingCartValidateCheckout would likely be best option. This does require PHP skills though. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 20, 2021 Share Posted February 20, 2021 On 19/02/2021 at 00:14, steven99 said: I don't think that is possible out of the box. you might be able to get close to it using Product Bundles - as long as you have enabled these two addons in the bundle configuration, then the cart should throw an error alert if either of the addons are removed.... and if these addons were hidden from the configproduct page, then I doubt the addons could easily be removed. although I think as steven suggests, you're probably going to need some validation at checkout to ensure both addons are included. 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted February 22, 2021 Share Posted February 22, 2021 That would work but it presumes that both addons are wanted and not just addon A without addon b. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 23, 2021 Share Posted February 23, 2021 17 hours ago, steven99 said: That would work but it presumes that both addons are wanted and not just addon A without addon b. fair point.... and I think I realised that half way through the answer, but I ploughed on regardless. 🙂 if you get to the stage of validating, then you could equally get the hook to add addon A if B is present - but let's not overcomplicate things! 0 Quote Link to comment Share on other sites More sharing options...
Newton Posted February 24, 2021 Author Share Posted February 24, 2021 Thanks to both of you for your help. I'm going to try the  ShoppingCartValidateCheckout route. Maybe as @brian! suggests, I'll try to get a hook to add addon A if B is present. Will come back if I'm stuck again 🙂 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 24, 2021 Share Posted February 24, 2021 would it be an option to make addon B = "Server Management & Configuration" ? do the addons have any functionality behind them ?? 0 Quote Link to comment Share on other sites More sharing options...
Newton Posted February 28, 2021 Author Share Posted February 28, 2021 That is the way I have it configured right now. But hoping I can split some of the addons (not just the ones given as exemple) to simplify the offer (by removing some redundancy - if that makes any sense :) 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 28, 2021 Share Posted February 28, 2021 14 hours ago, Newton said: That is the way I have it configured right now. But hoping I can split some of the addons (not just the ones given as exemple) to simplify the offer (by removing some redundancy - if that makes any sense :) oh it makes sense - we've all been in that trade off situation between trying to make the ordering process simpler/cleaner and the added coding hassle/consequences that that can often require. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted February 28, 2021 Share Posted February 28, 2021 On 2/20/2021 at 1:58 PM, brian! said: you might be able to get close to it using Product Bundles - as long as you have enabled these two addons in the bundle configuration, then the cart should throw an error alert if either of the addons are removed.... and if these addons were hidden from the configproduct page, then I doubt the addons could easily be removed. although I think as steven suggests, you're probably going to need some validation at checkout to ensure both addons are included. While that might work its bad UI design. Now you are forcing the customers to submit or try to check out every time to see another error leading to frustration and people just jumping boat and leaving the ordering process because they realize its sucks. If you are giving such a horrible experience before even buying a product, how can you even expect to gain customers... The Jquery logic works on the fly on other shopping carts and informs instantly the user about what needs to be changed without even reloading the page or going to the next step. The shopping cart validation should be used to avoid critical errors while upgrading, not for pre-ordering configuration options on a sales page. People like to play with configurations on shopping carts, its not only bad design to make them try to submit a form to see the changes, but it's also bad in terms of server performance. You don't want someone submitting a post request unless its necessary. 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.