Jump to content

Selecting a TLD from Hosting Packages


Craft

Recommended Posts

When any customer wants to purchase a new hosting package, if he wants to purchase a new domain for his hosting in the next step, he writes his domain name then he selects the TLD from a dropdown list.

The issue that we have more than 500 TLDs, and all the TLDs are starting with a DOT, so the customer can't type the first letter of the TLD to filter the list.

How can I remove this DOT?

 

Register.png

Link to comment
Share on other sites

5 minutes ago, Craft said:

How can I remove this DOT?

by changing one line in the configureproductdomain.tpl template...

<option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld}</option>

to...

<option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld|ltrim:'.'}</option>

lZZ1rxu.png

it shouldn't have any impact on the order process as you're just changing the label rather than the value being passed through the forms.

Link to comment
Share on other sites

8 hours ago, brian! said:

by changing one line in the configureproductdomain.tpl template...


<option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld}</option>

to...


<option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}>{$listtld|ltrim:'.'}</option>

lZZ1rxu.png

it shouldn't have any impact on the order process as you're just changing the label rather than the value being passed through the forms.

Perfect, it works 🙂

This file could be changed or restored to the default when updating WHMCS to a new version?

Can I add a DOT before the drop-down list? (After the text-field of the domain)

 

 

Edited by Craft
Link to comment
Share on other sites

14 hours ago, Craft said:

Perfect, it works 🙂

never in doubt! 🙂

14 hours ago, Craft said:

This file could be changed or restored to the default when updating WHMCS to a new version?

yes - updating WHMCS would overwrite this change (if the orderform theme hasn't been renamed) - but my thinking was...

  • the order process uses the original value of $listtld, so a hook that modified those values might prevent the order process from working (it might not - but I didn't see any point in testing it).
  • almost certainly, there will be no more v8.0 releases - and v8.1 is scheduled to include bootstrap, new client theme and updated order forms - so any hook solution that works today might not be applicable in v8.1 and if that's the case, you're no further forward by using a hook.... and I wouldn't expect 8.1 to go GA for at least four months from now.
  • assuming a hook that modified the array would prevent successful ordering, then you're looking at using JS to loop through the dropdown and change the labels... i'll guaratee that's a lot more code than just using |ltrim:'.' in the template (and again might not work in v8.1 where who knows what sort of bizarre TLD selection choices WHMCS might come up with! 😲)

which is a long winded way to suggest that you put up with editing the template for now, and then see what options are available in v8.1 if you still need/want/can do this then.

14 hours ago, Craft said:

Can I add a DOT before the drop-down list? (After the text-field of the domain)

I suspect that you would have to edit the existing div sizes to create the space for you to be able to do that.

Link to comment
Share on other sites

1 hour ago, brian! said:

yes - updating WHMCS would overwrite this change (if the orderform theme hasn't been renamed) - but my thinking was...

Is there an option to create a custom orderform to not be overwrite with the future updates?, same as creating a custom template rather than (six) template.

 

1 hour ago, brian! said:

I suspect that you would have to edit the existing div sizes to create the space for you to be able to do that.

Forget, it's not a big issue!

Link to comment
Share on other sites

22 hours ago, Craft said:

Is there an option to create a custom orderform to not be overwrite with the future updates?, same as creating a custom template rather than (six) template.

there's nothing to stop you renaming/duplicating standard_cart and modifying the duplicate - the problem them comes with updates and having to compare WHMCS changes to your own custom templates.

https://blog.whmcs.com/112975/customising-templates-the-easy-way

Link to comment
Share on other sites

3 hours ago, brian! said:

there's nothing to stop you renaming/duplicating standard_cart and modifying the duplicate - the problem them comes with updates and having to compare WHMCS changes to your own custom templates.

https://blog.whmcs.com/112975/customising-templates-the-easy-way

Ok, and after duplicating standard_cart folder with another name, how can I choose to use the new folder instead of standard_cart?

 

Link to comment
Share on other sites

15 hours ago, Craft said:

Ok, and after duplicating standard_cart folder with another name, how can I choose to use the new folder instead of standard_cart?

the same as you would with any orderform template - you would either define it as the default orderform from setup -> general settings -> ordering, and/or you would individually assign it to be used in specific product groups.

Link to comment
Share on other sites

4 hours ago, brian! said:

the same as you would with any orderform template - you would either define it as the default orderform from setup -> general settings -> ordering, and/or you would individually assign it to be used in specific product groups.

Got it.

I created a new folder and I added these files only, is that's enough? I just need to modify this file only (configureproductdomain.tpl)

custom standart_cart.png

Link to comment
Share on other sites

5 hours ago, brian! said:

you might need the css/js folders too.

Nope, because each cart of the other 7 carts are having their own css/js folders with their own custom codes.

So, if we don't need to overwrite any css/js of the standard_cart, then we shouldn't create the css/js folders.

Thank you 🙂

 

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