Jump to content

Victoria19

Member
  • Posts

    11
  • Joined

  • Last visited

Everything posted by Victoria19

  1. thanks for your help , i have to check it again Do you think this change is right?
  2. i changed add_hook("ClientAreaPage",1,"modify_custom_client_fields_hook"); to add_hook("ClientAreaPageProfile",1,"modify_custom_client_fields_hook"); and it worked but a new Customer can not order and when i delete that hook Customer can order 😐
  3. hi, thanks. I right-clicked on the mobile number option and looked at the code with inspecting, which is as follows <input type="text" name="customfield[51]" id="customfield51" value="" size="30" class="form-control"> Do we have to make another change in the code?
  4. thank you ,but i have some problems i used these codes but does not worked <?php /** * Modify Custom Client Fields on Profile Page * @author brian! */ function modify_custom_client_fields_hook($vars) { if ($vars['templatefile'] == "clientareadetails") { $oldkey = array(">"); $newkey = array(" readonly >"); $ccfids = array(51); foreach ($vars['customfields'] as $ccf => $value) { if (in_array($value['id'],$ccfids)) { $vars['customfields'][$ccf]['input'] = str_replace($oldkey,$newkey,$value['input']); } } return array("customfields" => $vars['customfields']); } } add_hook("ClientAreaPage",1,"modify_custom_client_fields_hook"); and i used that changes too but Had no effect as you say, you could untick the "admin only" checkbox and then in clientareadetails.tpl, change... {if $customfields} {foreach from=$customfields key=num item=customfield} <div class="form-group"> <label class="control-label" for="customfield{$customfield.id}">{$customfield.name}</label> <div class="control"> {$customfield.input} {$customfield.description} </div> </div> {/foreach} {/if} to... {if $customfields} {foreach from=$customfields key=num item=customfield} <div class="form-group"> <label class="control-label" for="customfield{$customfield.id}">{$customfield.name}</label> <div class="control"> {$customfield.value} {$customfield.description} </div> </div> {/foreach} {/if} basically, you're just changing $customfield.input to $customfield.value - and that, as the code suggests, just displays the current content of the customfields and doesn't provide the user with an option to edit them.... though you may need to adjust the layout to suit the output please help me 😞
  5. thanks alot for a complete explanation. but i have some problems at first i wanted to use "Locked Client/User Profile Fields" in setting for locked client to edit mobile number but mobile number is a custom field now i want to write a hook , for this i have a question how can i understand "ids in $ccfids " To add to the hook that you introduced. i send the picture of our customer field
  6. thanks,i wrote this html code for hook, can i use html for hook?or i should write php? <div class="col-md-9 pull-md-right main-content"> <form method="post" action="?action=details" role="form"> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <div class="control"> <input type="text" name="customfield[51]" id="customfield51" disabled="disabled" size="30" class="form-control"> </div> </div> </div> </div> </form> </div> Any solution and answer would be great.thanks
  7. hi,i found this websit but i want that client cannot change mobile number this link has setting for phone number https://blog.hostonnet.com/how-to-lock-client-profile-fields-in-whmcs Any solution and answer would be great. thanks
  8. i want to set specific products and prices to certain Client Groups? and How to set whmcs to display products based on login status?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated