glardone Posted August 24, 2016 Share Posted August 24, 2016 Dear all, I have modified the Domains Configuration template to add a descriptive text field for each domain in order: <div class="form-group"> <label for="RefClient">{$LANG.refclient}</label> <input type="text" class="form-control" id="RefClient" name="refclient" value="{$refclient}" /> </div> I would like to save to a custom table data entered with a hook "AfterShoppingCartCheckout". I though I did not understand how to retrieve the array of variables $refclient Thank you! 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted August 25, 2016 Share Posted August 25, 2016 try this ActionHook point http://docs.whmcs.com/Hooks:ShoppingCartValidateDomainsConfig 0 Quote Link to comment Share on other sites More sharing options...
consul Posted August 26, 2016 Share Posted August 26, 2016 Ok, I have tried this hook: <?php add_hook("ShoppingCartValidateDomainsConfig", 1, function refclient_hook($vars) { $refclient = $vars['RefClient']; $return = array("refclient" => $refclient); return $return; }); But it's not work properly... How can I retrieve the variable values "$refclient" sent by form "<form method="post" action="{$smarty.server.PHP_SELF}?a=confdomains" id="frmConfigureDomains">" ? Thank you! 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted August 26, 2016 Share Posted August 26, 2016 extract it from $_POST <?php add_hook("ShoppingCartValidateDomainsConfig", 1, function refclient_hook($vars) { $refclient = $_POST['RefClient']; $return = array("refclient" => $refclient); return $return; }); 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.