dimatech Posted May 30, 2015 Share Posted May 30, 2015 Hello, This is my first THread in this Forum. I am new to WHMCS and i configure most of things in a good way. however, i face a "problem" when i want to give prices to my ccTLD (.PS). because it deppends on number of letters in the domain. for example. 2 letters ( ab.ps) = 500$ one time 250$ recuring 3 letters ( abc.ps) = 200$ one time 50$ recuring 3+ letters ( abcd...)= 30$ one time 30$ recuring how may i apply that? i check the documentation .. there is only a way to limit the number of letters $DomainMinLengthRestrictions[".asia"] = 4; $DomainMaxLengthRestrictions[".asia"] = 64; thank you for your help 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 30, 2015 Share Posted May 30, 2015 that's an interesting question... unfortunately, I don't think there is a way to do this simply by modifying some WHMCS settings - you may need to post in Marketplace and pay someone to create an addon to do this. http://forum.whmcs.com/forumdisplay.php?49-Marketplace by default, a TLD can only have one price within WHMCS. are you sure that you can register 2-letter .ps domains? as far as I know, they have to be between 3 & 63 characters for .ps registrations - perhaps the rules have changed since I last checked... and as it's your local ccTLD, you probably know the rules better than me! 0 Quote Link to comment Share on other sites More sharing options...
dimatech Posted May 30, 2015 Author Share Posted May 30, 2015 that's an interesting question... unfortunately, I don't think there is a way to do this simply by modifying some WHMCS settings - you may need to post in Marketplace and pay someone to create an addon to do this. http://forum.whmcs.com/forumdisplay.php?49-Marketplace by default, a TLD can only have one price within WHMCS. are you sure that you can register 2-letter .ps domains? as far as I know, they have to be between 3 & 63 characters for .ps registrations - perhaps the rules have changed since I last checked... and as it's your local ccTLD, you probably know the rules better than me! Thank you brian for your Reply .. I will wait a while before submitting that to Marketplace.. maybe someone have a solution for that. For ccTLD .. there is always changes in our Country .. yes you can now register 2 letters domain name .. however this is not autmatic registration this is manual one.. and its for local business only ( not international) BTW do you have experinece in programing Module for registerar ? Thanks again 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 30, 2015 Share Posted May 30, 2015 BTW do you have experience in programming Module for registrar ? some, but there are others with more experience than me who'll be in a better position to help you. I suspect you'll have to have the registrar module written - unless you can find a Palestinian registrar who offers a WHMCS registrar module... even if one of the current WHMCS worldwide registrars offer .ps domain registrations, from what you say, it sounds like they couldn't register 2-letter domains as they're not local. using a custom registrar module, it might also be possible to sell .ps premium names too - depends what the API allows. 0 Quote Link to comment Share on other sites More sharing options...
osvaldo.livondeni Posted December 16, 2025 Share Posted December 16, 2025 Hi there, I know this is an old topic, but recently I was searching for the same answear. So after find a solution, I'm posting it here to help those who may need it too: <?php /** * WHMCS Hook: OrderDomainPricingOverride * * This hook overrides the domain pricing for .ao domains with exactly 3 letters in the SLD. * * Place this file in /includes/hooks/custom_ao_pricing.php * * Adjust the $threeLetterPrice below to your desired price. * * Developed based on WHMCS documentation as of 2025. */ add_hook('OrderDomainPricingOverride', 1, function($vars) { // Define custom price for 3-letter .ao domains (per year, adjust as needed) $threeLetterPrice = 500.00; // Example: $100 for registration/transfer/renewal // Extract SLD and TLD from domain $domainParts = explode('.', $vars['domain'], 2); if (count($domainParts) !== 2) { return; // Invalid domain format } $sld = $domainParts[0]; $tld = $domainParts[1]; // Check if it's .ao and SLD is exactly 3 letters if (strtolower($tld) === 'ao' && strlen($sld) === 3 && ctype_alpha($sld)) { // Assuming letters only, adjust if needed // Override both first payment and recurring amount // Multiply by registration period for multi-year $firstAmount = $threeLetterPrice * $vars['regperiod']; $recurringAmount = $threeLetterPrice * $vars['renewalperiod']; return [ 'firstPaymentAmount' => $firstAmount, 'recurringAmount' => $recurringAmount ]; } // Otherwise, use default pricing return; }); 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.