solidblueliquid Posted February 28, 2019 Share Posted February 28, 2019 Hi Everyone, I'm looking for a help with validations for VPS products. My base VPS has 1GB of ram which isn't enough for cpanel to run. How can i create a validation rule to not allow them to order cpanel on this VPS. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Nathan Posted February 28, 2019 WHMCS Developer Share Posted February 28, 2019 You could look into using the ShoppingCartValidateCheckout hook-point for this: https://developers.whmcs.com/hooks-reference/shopping-cart/#shoppingcartvalidatecheckout The products and configuration are stored in $_SESSION[‘cart’] so you could loop through those to ensure that your validation requirements are met. If they aren't, then you could return an error which would prevent the checkout process from completing. -1 Quote Link to comment Share on other sites More sharing options...
solidblueliquid Posted March 1, 2019 Author Share Posted March 1, 2019 I probably should have mentioned that i'm not a developer, so most of this just means nothing to me. To do these changes would i need to edit the original WHMCS files? Would they not get override in an upgrade? 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 1, 2019 Share Posted March 1, 2019 Hooks go in to includes/hooks within the WHMCS install folder and are not overwritten on upgrades. If you are not familiar with PHP, then it would be best to get a php developer to do this for you. 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.