Jump to content

Trial Account - Subdomain Only


MarkEliasen

Recommended Posts

Hi Everyone.

 

Since I do not have any Smarty experience at all, I thought I would request some help in here.

 

I have setup a trial hosting product, but I would like it so that your only able to choose a a free sub-domain with the trial account.

 

I know (from asking Matt) that I need to edit the "/templates/orderforms/web20cart/configureproductdomain.tpl" (I use web20cart).

 

I am just not sure how to check for a certain product and then only output sub-domain registration.

 

Anyone got some hits or like to help me get started?

 

Thank in advance for reading all this and getting this far :)

 

Mark

Link to comment
Share on other sites

I ran out of time (15 mins edit limit :P)

 

Here is how you do it!

 

I will tell you how to do this with Web20cart template, but should be very easy to do with any of the others as well:

 

1). find whmcs/templates/orderforms/web20cart/configureproductdomain.tpl

2). go to line 12 and add this:

{if $pid eq <your pid here>}
 <p><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'" />
 <label for="selsubdomain">{$LANG.orderdomainoption4}</label></p>
 {else}

 

3). go to line 39. It should look like this:

{/if} <br />

 

replace with this:

 

 {/if}{/if} <br />

 

Cheers

Link to comment
Share on other sites

  • 1 year later...
  • 11 months later...

Hi

 

i know this thread is a bit old but i have work this out for 4 Hours now and have the Solution so i will help others to the Trick ;)

 

For templates\orderforms\web20cart:

 

On Line 12 BEFORE: {if $incartdomains}

 

{if $pid = '12345'} 12345=YOUR ID

<p><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'" />

<label for="selsubdomain">{$LANG.orderdomainoption4}</label></p>

{else}

 

and Double the last {/if} on Line 39

 

Done.

 

For templates\orderforms\modern:

 

 

On Line 12 BEFORE: {if $incartdomains}

 

{if $pid = '12345'} 12345=YOUR ID

<div class="option">

<label><input type="radio" name="domainoption" value="subdomain" id="selsubdomain" />{$LANG.cartsubdomainchoice|sprintf2:$companyname}</label>

<div class="domainreginput" id="domainsubdomain">

http:// <input type="text" id="subdomainsld" size="30" value="{$sld}" /> <select id="subdomaintld">{foreach from=$subdomains key=subid item=subdomain}<option value="{$subid}">{$subdomain}</option>{/foreach}</select> <input type="submit" value="{$LANG.ordercontinuebutton}" />

</div>

</div>

{else}

 

and Double the last {/if} on Line 71

 

Hope it would Hhelp someone.

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