AeonCube
12-10-08, 08:52 AM
Require domain name to be registered / transferred for only 1 product
This is perfect if you have a product that you want to force the user to register or transfer a domain name and not be able to use the name servers option when all other products will have this option.
Find the files
Locate configureproductdomain.tpl in the order form template folder you are using:
wwwroot/templates/orderforms/boxes/
wwwroot/templates/orderforms/cart/
wwwroot/templates/orderforms/default/
wwwroot/templates/orderforms/singlepage/
Find these lines
{if $owndomainenabled}
<input type="radio" name="domainoption" value="owndomain" id="selowndomain" onclick="document.getElementById('register').style.display= 'none';document.getElementById('transfer').style.d isplay='none';document.getElementById('owndomain') .style.display='';document.getElementById('subdoma in').style.display='none';document.getElementById( 'incart').style.display='none'" /> <label for="selowndomain">{$LANG.orderdomainoption2}</label><br />
{/if}
After you have found these lines you will need to add an if statement around these.
The if statement is
{if $pid neq '#PRODUCTID#'}
{/if}
Replace #PRODUCTID# with the product ID found in the WHMCS admin or when you go to order a product you will see the ID (pid) in the URL string. (URL Example: http://www.yourdomain.co.uk/whmcs/cart.php?a=add&pid=1)
So the end code will be
{if $pid neq '#PRODUCTID#'}
{if $owndomainenabled}
<input type="radio" name="domainoption" value="owndomain" id="selowndomain" onclick="document.getElementById('register').style.display= 'none';document.getElementById('transfer').style.d isplay='none';document.getElementById('owndomain') .style.display='';document.getElementById('subdoma in').style.display='none';document.getElementById( 'incart').style.display='none'" /> <label for="selowndomain">{$LANG.orderdomainoption2}</label><br />
{/if}
{/if}
Hope this is handy :)
This is perfect if you have a product that you want to force the user to register or transfer a domain name and not be able to use the name servers option when all other products will have this option.
Find the files
Locate configureproductdomain.tpl in the order form template folder you are using:
wwwroot/templates/orderforms/boxes/
wwwroot/templates/orderforms/cart/
wwwroot/templates/orderforms/default/
wwwroot/templates/orderforms/singlepage/
Find these lines
{if $owndomainenabled}
<input type="radio" name="domainoption" value="owndomain" id="selowndomain" onclick="document.getElementById('register').style.display= 'none';document.getElementById('transfer').style.d isplay='none';document.getElementById('owndomain') .style.display='';document.getElementById('subdoma in').style.display='none';document.getElementById( 'incart').style.display='none'" /> <label for="selowndomain">{$LANG.orderdomainoption2}</label><br />
{/if}
After you have found these lines you will need to add an if statement around these.
The if statement is
{if $pid neq '#PRODUCTID#'}
{/if}
Replace #PRODUCTID# with the product ID found in the WHMCS admin or when you go to order a product you will see the ID (pid) in the URL string. (URL Example: http://www.yourdomain.co.uk/whmcs/cart.php?a=add&pid=1)
So the end code will be
{if $pid neq '#PRODUCTID#'}
{if $owndomainenabled}
<input type="radio" name="domainoption" value="owndomain" id="selowndomain" onclick="document.getElementById('register').style.display= 'none';document.getElementById('transfer').style.d isplay='none';document.getElementById('owndomain') .style.display='';document.getElementById('subdoma in').style.display='none';document.getElementById( 'incart').style.display='none'" /> <label for="selowndomain">{$LANG.orderdomainoption2}</label><br />
{/if}
{/if}
Hope this is handy :)