Jump to content

Free domain not working?


Recommended Posts

Hi folks,

 

Wonder if someone could help me please. I'm trying to set up WHMCS in such a way that a person receives a free domain when they signed up for a hosting account. I've set up my 3 hosting packages and altered the Free Domain area to house the correct TLDs. However, when I set up the domain pricing as 0.00 they don't appear in the drop down so a person cannot choose their domain. So, if I then give the domains a price, they appear on the checkout page with a cost associated, in other words, they aren't free.

 

Ideally I'd like to skip anything to do with domain costing, so a person simply enters the domain and chooses the extension, then the site presents them with a "Congratulations" message but without the drop down to select duration to register, it simple leaves that out.

 

Can anyone assist me or point me in a direction please?

Link to comment
Share on other sites

Hi folks,

 

Wonder if someone could help me please. I'm trying to set up WHMCS in such a way that a person receives a free domain when they signed up for a hosting account. I've set up my 3 hosting packages and altered the Free Domain area to house the correct TLDs. However, when I set up the domain pricing as 0.00 they don't appear in the drop down so a person cannot choose their domain. So, if I then give the domains a price, they appear on the checkout page with a cost associated, in other words, they aren't free.

have you followed the steps shown at the link below?

 

http://docs.whmcs.com/Common_Promotions

 

I just setup a dummy product with free domain and it works fine.

 

if you give the tld a price, it does show on the dropdown list - but if you choose a valid tld, then it is added to the cart as a free domain... in one way, this is good as it shows a domain costing x, but they're getting it free - but the fact that it shows a price at all at that stage of the ordering process, might put others off from progessing.

 

personally, I think showing a price is a good thing, but can also see the other perspective.

 

Ideally I'd like to skip anything to do with domain costing, so a person simply enters the domain and chooses the extension, then the site presents them with a "Congratulations" message but without the drop down to select duration to register, it simple leaves that out.

there are two solutions I can think of to this...

 

one would be, in domain pricing, remove the prices for more than 1 year (i.e set them to 0 for registrations and -1 for transfers)... you'd still get the dropdown, but it would only show the one year registration cost.

 

the other way would be to edit your order form template file(s) to remove the dropdown - specifically domainoptions.tpl

 

this might vary depending on your order form, but the dropdown is created from the line below...

 

<div class="domainregperiod">{$LANG.cartregisterhowlong} <select name="domainsregperiod[{$domain}]" id="regperiod">{foreach key=period item=regoption from=$regoptions}{if $regoption.register}<option value="{$period}">{$period} {$LANG.orderyears} @ {$regoption.register}</option>{/if}{/foreach}</select></div>

you could change that to...

 

<input type="hidden" name="domainsregperiod[]" id="regperiod" value="1" />

that would remove the dropdown and fix the registration period to one year automatically.

 

i've tested it on my cart and the above code seems to work fine.

Link to comment
Share on other sites

Hi @brian!

 

Thank you very much for coming back to me with so much detail.

 

I've managed to hide the drop down that appears so thank you for that. I ended up using a visibility:hidden because I couldn't locate the domainoptions.tpl file, I guess the template on my side uses a different file and this CSS tweak does the job.

 

I also noticed that in the final cart, the domain is marked as free: http://i.imod.co.za/9x43 - strange because I can assure you that it wasn't like this yesterday.

 

THANK YOU for your help, really impressed with the quick and detailed response.

Link to comment
Share on other sites

  • 10 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