Jump to content

Removing Affiliates-links and State-requirement


Dids

Recommended Posts

Hello everyone,

 

I've been searching for quite some time now, but haven't exactly found a good/clean way of removing all the affiliate links in WHMCS (feature is disabled, but I don't want the links to be there either).

 

Also, since I've translated WHMCS to finnish, and will only be using that one language, I need to find a way to remove the State-line from the registration form, as there are no states here.

 

Thank you in advance!

Link to comment
Share on other sites

Both can be done by editing the templates, if you don't want the affiliates link to show, open up the file that contains the navigation bit (probably header.tpl) and remove the code that pertains to the affiliates link.

 

You'll also need to remove the affiliates link, and the affiliates icon on the homepage template.

 

The states field could be removed by editing the viewcart.tpl file, just remove the following:

 

<tr><td class="fieldarea">{$LANG.clientareastate}</td><td>{if $loggedin}{$clientsdetails.state}{else}<input type="text" name="state" style="width:80%;" value="{$clientsdetails.state}" />{/if}</td></tr>

 

But not sure if it would mess up the validation, so make sure you make a backup of the original file before testing!

Link to comment
Share on other sites

Thanks for the quick reply!

 

However, even though that line removes the State field from the form, it still shows up as "required". Anyway around this?

 

The affiliate link removal sounds easy enough, I'll figure that one out later.

 

Thank you.

Link to comment
Share on other sites

Still haven't figured out a way to do this.

 

Though, I do remember trying one of the "solutions" that basically adds a static (hidden) value to the State. That never worked for me though.

 

Hope someone's found a way. :-/

Link to comment
Share on other sites

Solved!

 

In the same viewcart.tpl I simply added a line like this:

 

<input type="hidden" name="state" size="20" value="N/A" />

 

So the value is set to something (N/A in this case), but it's never shown to the client/user.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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