CCSupport Posted December 15, 2014 Share Posted December 15, 2014 Hello all, I have just noticed a problem when clients go through our Checkout process. After they choose any product (that requires a domain) they get to the 'Register a domain', Transfer a domain', 'if you already own a domain' etc...as below: So...the issue is, when a perspective client wants to register a domain they add the domain name and select the TLD....however even though they have selected a TLD it comes up with a list of ALL TLDs available: Is this something we can remove? Thanks in advance 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 15, 2014 Share Posted December 15, 2014 the quick way to prevent this would be to go in the admin area to.. setup -> general settings -> domains -> Bulk Check TLDs and unselect all of the TLDs that you've highlighted - though this will also disable their display for those just buying a domain without a product. if that's an issue for you, then you may need to tweak one of the template files - looking at your images, that will probably be domainoptions.tpl 0 Quote Link to comment Share on other sites More sharing options...
CCSupport Posted December 15, 2014 Author Share Posted December 15, 2014 Thanks Brian. I will take a look at the tpl file and see what I can do. Don't really want to reduce the domain TLDs that someone can register when buying a product. Rather they could use the drop-down to simply choose the TLD and be done with it. Seems like bad coding if this doesn't work like that. Especially as more and more domains are being added but one wouldn't expected a huge list of potential domains to appear when specifying a TLD already. I can understand it when someone is searching for domains or going into But register itself, but not through the checkout area. Hopefully I can tweak it in some way! Thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 15, 2014 Share Posted December 15, 2014 you'll probably be looking to modify the following block... {if $othersuggestions} the quickest way I can think of, apart from making accurate modifications to the template(!), would be to just change the {if} statement to... {if $othersuggestions2} it will never be true, so the other tlds won't be shown. 0 Quote Link to comment Share on other sites More sharing options...
CCSupport Posted December 15, 2014 Author Share Posted December 15, 2014 Thanks Brian. I shall do just that! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 16, 2014 Share Posted December 16, 2014 just a little update on this... the above won't work - it removes the other tld suggestions for both domain only and hosting orders... I should never post code while watching a football match! there are two ways to do this... the first is not 100% reliable, so should probably not be used; the second, using Session variables, should provide a better solution. firstly, by using HTTP_REFERER... most of the time this will work fine, but if no HTTP_REFERER info is sent by the user's browser, then the following code will always display the other tld suggestions (if referer is sent, then it won't for products). {if $othersuggestions and !$smarty.server.HTTP_REFERER|strstr:'pid='} however, probably the more reliable option is to use the Session array to detect what's in the cart and act accordingly... {if $othersuggestions and !isset($smarty.session.cart.domainoptionspid)} if purchasing a hosting product, then 'domainoptionspid' will contain the PID value for the product - so the above line checks to see if domainoptionspid has been set - if it has, then it's a product and will not display the other tld suggestions; if it has not been set, then it is a domain-only purchase and it will show the tld suggestions. if you ever wanted to reverse this (e.g no tld suggestions for domain only, but suggestions for products), then you just remove the ! from in front of isset. you could even expand the {if} statement to show tld suggestions for some products and not for others... but let's not complicate it at this stage! 0 Quote Link to comment Share on other sites More sharing options...
CCSupport Posted December 16, 2014 Author Share Posted December 16, 2014 Wow...great info Brian. I will be giving that a go over the next couple of days. I will let you know how it goes 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.