Jump to content

Changing the default domain option


Recommended Posts

test_domain.png

 

Hi,

I have 2 questions regarding domain options for my customers,

1. How do I change the default radiobutton clicked to be shown to the customer, from "I want a new domain name" to "subdomain". (I tried to edit configureproductdomain.tpl , but couldn't find a solution)

 


{if $subdomains}
<div><label><input type="radio" name="domainoption" value="subdomain" id="selsubdomain" onclick="document.getElementById('register').style.display='none';document.getElementById('transfer').style.display='none';document.getElementById('owndomain').style.display='none';document.getElementById('subdomain').style.display='';document.getElementById('incart').style.display='none'" /> {$LANG.orderdomainoption4}</label></div>
{/if}

{if $incartdomains}
<div><label><input type="radio" name="domainoption" value="incart" id="selincart" onclick="document.getElementById('register').style.display='none';document.getElementById('transfer').style.display='none';document.getElementById('owndomain').style.display='none';document.getElementById('subdomain').style.display='none';document.getElementById('incart').style.display=''" /> {$LANG.cartproductdomainuseincart}</label></div>
{/if}

{if $registerdomainenabled}
<div><label><input type="radio" name="domainoption" value="register" id="selregister" onclick="document.getElementById('register').style.display='';document.getElementById('transfer').style.display='none';document.getElementById('owndomain').style.display='none';document.getElementById('subdomain').style.display='none';document.getElementById('incart').style.display='none'" /> {$LANG.orderdomainoption1part1} {$companyname} {$LANG.orderdomainoption1part2}</label></div>
{/if}

{if $transferdomainenabled}
<div><label><input type="radio" name="domainoption" value="transfer" id="seltransfer" onclick="document.getElementById('register').style.display='none';document.getElementById('transfer').style.display='';document.getElementById('owndomain').style.display='none';document.getElementById('subdomain').style.display='none';document.getElementById('incart').style.display='none'" /> {$LANG.orderdomainoption3} {$companyname}</label></div>
{/if}

 

 

2. How can I edit the words there, so for example, I would change "I want to use a free subdomain" to "I want to use a FREE subdomain"

 

Thanks a lot!

Link to comment
Share on other sites

I have 2 questions regarding domain options for my customers,

 

1. How do I change the default radiobutton clicked to be shown to the customer, from "I want a new domain name" to "subdomain". (I tried to edit configureproductdomain.tpl , but couldn't find a solution)

before the {if $subdomains} line, add the following bit of Smarty code...

 

{assign var="domainoption" value="subdomain"}

note: the order of the radio buttons doesn't matter for this to work - even if "subdomain" is the last option, you can still make the radio button default to it by adding the above line of code.

 

this will be the default option for all products - if you only want this for specific products, you could wrap the assign code in an {if} statement and determine which product(s) this should apply to.

 

2. How can I edit the words there, so for example, I would change "I want to use a free subdomain" to "I want to use a FREE subdomain"

using Language Overrides - http://docs.whmcs.com/Language_Overrides

 

following the instruction on the page, and create an override file for each language you wish to modify and add...

 

<?php
$_LANG['orderdomainoption4'] = "I want to use a <strong>FREE</strong> subdomain.";

Link to comment
Share on other sites

  • 7 months later...
  • 6 years later...

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