johnc Posted July 27, 2016 Share Posted July 27, 2016 Hi, Guys. I have a product is related to the 3rd party. When admin click [accept order] of this product, I want to implement a process like the following code; function process(){ if($thirdparty->canAddMoreDomain()){ //accept this order }else{ //display flash message "You can't add more domain as limited domain number" //do not make this order } } How can I implement this process ? Thank you for your help in advance. 0 Quote Link to comment Share on other sites More sharing options...
johnc Posted July 27, 2016 Author Share Posted July 27, 2016 I reply myself. https://github.com/SpamExperts/whmcs-addon Spamexpert module example help me a lot. It use server module and acceptOrder hook event. function process(){ if($thirdparty->canAddMoreDomain()){ return 'success'; //success order }else{ return 'any other erro message here then this trigger stopping process'; } } 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted July 27, 2016 Share Posted July 27, 2016 How can I implement this process ? using this ActionHook:AcceptOrder 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.