Jump to content

Disable premium domains in standard whmcs domain lookup


cezar

Recommended Posts

Hi, i have problem with premium domains, i don't want to sell them and i cant disable to show them when a client execute a domain name searching. For example if a client will search for ad.blue, whmcs will return that the domain it's available for registration and will cost 3$ but in fact this is a premium domain and it cost about 500$, what i want is when a client search for domain, if it's premium the result need to be unavailable.

 

I have found something on whmcs documentation but i am not sure how to implement.....

 

<?php

//Stop the Domain Purchase for this Premium Domain
add_hook('PremiumPriceOverride', 1, function($vars) {
   return ['noSale' => true,];
});

//Force the Client to Contact Support to Purchase Domain
add_hook('PremiumPriceOverride', 1, function($vars) {
   return ['contactUs' => true,];
});

//Override the Register and Renew Pricing & Skip Markup Application
add_hook('PremiumPriceOverride', 1, function($vars) {
   return [
       'register' => 150.00,
       'renew' => 200.00,
       'skipMarkup' => true,
   ];
});

 

Thanks.

Link to comment
Share on other sites

  • WHMCS Developer

If you are using a standard WHOIS Lookup for domains, then it isn't possible to filter out of the premium domains. WHMCS can only be informed of a premium domain when using a registrar such as eNom or ResellerClub to complete the domain lookups.

 

You can configure the lookup provider in your Domain Pricing settings.

 

The above is something you can use as a hook. You can create a file in includes/hooks and add the required hook to your file (in this case the first one).

 

You can also disable premium domains once you have a lookup provider configured - https://docs.whmcs.com/Premium_Domains

Link to comment
Share on other sites

Hi, i have problem with premium domains, i don't want to sell them and i cant disable to show them when a client execute a domain name searching. For example if a client will search for ad.blue, whmcs will return that the domain it's available for registration and will cost 3$ but in fact this is a premium domain and it cost about 500$, what i want is when a client search for domain, if it's premium the result need to be unavailable.

the answer will depend on your WHMCS version and your lookup provider...

 

so if we assume you're using v7.2.3, on the domain pricing page, you can change your lookup provider...

 

g8rMuNF.png

 

the LogicBoxes compatible registrars (NetEarthOne, Resellercamp, Resellerclub and UK2) all include an option to enable/disable premium domains - so if you're using one of them, you can disable them that way... or price the margins accordingly if you want to sell them.

 

however, if you're using Standard Whois, then there won't be any guaranteed way to prevent premium domains showing as available with default pricing - basically because WHOIS just returns whether it's registered or not, it doesn't know if it's premium and the cost - only using an API method would you get that information.

 

the simpler solution, if using Standard Whois, is to avoid selling TLDs that offer premium domains. :roll:

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