Mohsin Sumar Posted July 17, 2021 Share Posted July 17, 2021 Hello, We are working on becoming an accredited registrar of one of the ccTLDs. We need to be able to charge customers based on the registrant country i.e. if the registrant is “local” or “international”. I have seen that, we can introduce an extended domain attribute; however, I am not able to figure out how to; a) During registration to capture the extended attribute if local/international, then; - Restrict the country list drop down - Update the cart fee based on this field b) Preventing modifying this extended attribute and country from client area and admin afterwards Any guidance would be appreciated Thank you 0 Quote Link to comment Share on other sites More sharing options...
Remitur Posted July 17, 2021 Share Posted July 17, 2021 Where're you from? If your company is somewhere European based, you can't do it because it's forbidden. To do it: - create a client group (i.e. "foreigners") and associate the domain price list with preferred prices - create a hook that, just after registration, assign the user to the "foreigners" client group whenever the country is not your own homecountry 0 Quote Link to comment Share on other sites More sharing options...
Mohsin Sumar Posted July 17, 2021 Author Share Posted July 17, 2021 Hey - thanks for your reply. I’m not from Europe, so I think I’m good to implement this registry pricing structure. I like the idea of client hook, when created, if the country is out of the list then we assign a client group. I believe this should work. There’s one catch. How would that work with the cart, as in, would the price in cart update after registration? 0 Quote Link to comment Share on other sites More sharing options...
Remitur Posted July 20, 2021 Share Posted July 20, 2021 On 7/17/2021 at 4:32 PM, Mohsin Sumar said: There’s one catch. How would that work with the cart, as in, would the price in cart update after registration? Different way to fix the issue: - do not allow unregistered user to begin orders: one user is required to register, and then he will be allowed to insert an order or - as "default" client group set the prices reserved for foreigners; if a user begins registration process, he will be forced to pay the higher fee. Later, after registration you will set renewal fee accordingly or - use some kind of cart hook (i.e. PreShoppingCartCheckout ) to dinamically modify prices before checkout (note: this may be rather difficult, and far from error-proof...) 0 Quote Link to comment Share on other sites More sharing options...
Mohsin Sumar Posted July 20, 2021 Author Share Posted July 20, 2021 Hi - Thanks for ideas, really appreciate Would you know which hook/template/config that can be changed to block country on sign up? I’ll explore the PreShoppingCartCheckout and related hooks. 0 Quote Link to comment Share on other sites More sharing options...
Remitur Posted July 20, 2021 Share Posted July 20, 2021 I guess you should try to do it using ClientDetailsValidation: when a user register, you check the country and assign to client group accordingly. You can also evaluate this free module: https://www.modulesgarden.com/products/whmcs/geolocation-hook (in order i.e. to remove from the template the "register" public function for foreign customers , leaving it just for logged users) 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted July 20, 2021 Share Posted July 20, 2021 Unless you try to validate the payment account or billing address, I'm sure some people will just register again with a different country if they realize the price is cheaper. Nothing stops them from registering with a different country, but paying with a card or account from another one. 0 Quote Link to comment Share on other sites More sharing options...
Mohsin Sumar Posted July 20, 2021 Author Share Posted July 20, 2021 Hi Yggdrasil Thanks for that input. I think country restriction on sign up will be a good start, which even goes a long way in showing the effort put in place to prevent unintended registrations. The payment details can be implemented later if at all possible, alternatively, be covered under registration terms of that ccTLD to revoke the domain if it is registered with incorrect information. Hi Remitur, Thanks for that again. I do recall using this free module from Modules Garden which didn’t work very well with WHMCS behind cloudflare. I’ll check it out again, especially the source code to see if something can be used from it to solve this challenge. And, thanks for the direction to ClientDetailsValidation. I am seeing hope on this hook, to maybe - a) Detect the country, and cross check with allowed countries b) Use it to setup a custom admin client field to Local or International c) Add the client to a client group appropriately. d) Maybe, use the custom field in the registrar module as a validation check to allow or prevent registration too. I’ll try it out. Many thanks! 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.