Jump to content

Increasing domain fee based on extended attribute


Recommended Posts

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

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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? 
 

 

Link to comment
Share on other sites

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...)

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

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