Jump to content
Sign in to follow this  
JackRabbit

Approval and notifications for transfers and nameserver updates

Recommended Posts

Is it possible to approve a domain name transfer before the transfer takes place? Or approve domain unlocks?

Also is it possible to receive notifications when a nameserver is updated?

The problem I'm having is that I offer free domains and a $1 hosting trial as a promotion to sign up. A few people are signing up, transferring their domains and canceling right away to get a free domain which is costing me money. I have a policy that if they use the free domain coupon, in order to move their domain, they need to pay for one full month of hosting or pay for their domain but I have no way of enforcing that at the moment.

 

Share this post


Link to post
Share on other sites
4 hours ago, JackRabbit said:

Is it possible to approve a domain name transfer before the transfer takes place?

it might be registrar-dependant and available outside of WHMCS... certainly, OpenSRS has the option (on it's registrar site) to not automatically accept incoming transfers... doubt you can do the same with outgoing (which I assume is your main concern).

4 hours ago, JackRabbit said:

Also is it possible to receive notifications when a nameserver is updated?

not built-in - you'd have to code it... and that's assuming they change it in WHMCS... if they can change it at the registrar's site, that's another matter.

4 hours ago, JackRabbit said:

The problem I'm having is that I offer free domains and a $1 hosting trial as a promotion to sign up. A few people are signing up, transferring their domains and cancelling right away to get a free domain which is costing me money. I have a policy that if they use the free domain coupon, in order to move their domain, they need to pay for one full month of hosting or pay for their domain but I have no way of enforcing that at the moment.

by default, all our non-.uk domains are locked (when applicable) automatically at the time of registration... if you can do that with your registrar, and then alter the client area pages with conditionals... e.g if less than x days after registration, hide the registrar lock / ns children in the sidebar and, as added insurance (in case they use a direct link), do the same in the template... that makes it difficult for the client to unlock and/or change dns.

you're probably looking at hooks for both - certainly one to remove the relevant sidebar children (if they exist in your theme), and the other to calculate the time between today and the registration and/or expiry dates... you could do that in the template if necessary using accessible variables, but I might be tempted to do it in PHP... though I suppose you'd have to edit the template anyway to add the conditional if statement in.

but the exact requirement will depend upon your client area template and what it does, and doesn't show as available features, to the client.

just had to post this while it was fresh in my head... I can now return to my day off... :399_birthday:

Share this post


Link to post
Share on other sites

This was such a long time ago and I'm finally going to add this. I'm not a coder, so I'm a little confused.

I want to create a hook that says: 

If  client has less than 2 invoices paid, hide "Registrar Lock" from the sidebar on the domain overview page. 

I'm trying to use this for help:
https://docs.whmcs.com/Client_Area_Sidebars_Cheatsheet

I'll use this code example:

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar)
{
    if(!is_null($primarySidebar->getChild('My Account')) && !is_null($primarySidebar->getChild('My Account')->getChild('Billing Information'))){
    $primarySidebar->getChild('My Account')->removeChild('Billing Information');
    }
});

But how can I add  the  variable $clientstats.numpaidinvoices to the php?  I've been  trying several variations without luck.

Share this post


Link to post
Share on other sites
36 minutes ago, JackRabbit said:

But how can I add  the  variable $clientstats.numpaidinvoices to the php?

if you're going down the road of using $clientsstats values, then it should be...

	GLOBAL $smarty;
	$paidinvoices = $smarty->getTemplateVars()['clientsstats']['numpaidinvoices'];

but perhaps a cleaner way would be to use the $client context instead of GLOBAL $smarty - which allows you to check that they're logged in (e.g a client) before attempting to get the client variables...

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) {
	
	$client = Menu::context('client');
	if ($client) {
		$paidinvoices = $client->invoices->where('status','Paid')->count();
		if ($paidinvoices < 2 && !is_null($primarySidebar->getChild('Domain Details Management')) && !is_null($primarySidebar->getChild('Domain Details Management')->getChild('Registrar Lock Status'))){
			$primarySidebar->getChild('Domain Details Management')->removeChild('Registrar Lock Status');
		}
	}
});

the count values should be the same between the two methods.... there are other methods, but either of the above two should be the simplest for your situation.

Share this post


Link to post
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.

Sign in to follow this  

  • Similar Content

    • By battles
      We've had our ENOM connection for years now. No changes to our default nameservers.
      Suddenly - we cannot register domains.
      Order Accept Encountered Problems
      No nameservers are defined for the server this domain is assigned to. Please correct and try again.
       
      Anyone else experiencing this?
    • By So, who am I ?
      Hello
      System returns incorrect information about a domain while checking availability for transfer.
      When I check domains for transfer it says that every domain is 'Available', except the ones that aren't registered at all and says 'Not Available', the response is true in this case. Domain that is transferring to me from another registrar should be 'Available' as well (and it works fine too), but domain that's transferred to me shouldn't be available for transfer on my site again, cuz how can one transfer from myself to myself, right?
      Not quite sure how CheckAvailability works for transfer, when it's for register, it uses WHOIS and gets response from it, but when it comes to Transfer, I'm not sure how system works, my theory is that it checks 'tbldomains' table in database to see if domain has 'Active' status in database and avoid double transfer, but it needs to use WHOIS as well to check if domain is registered at all and is available for transfer. Again, not sure if my theory is correct, it's just my guess.
      WHOIS works fine when it comes to registration and it was working fine for Transfer as well until now, I've not made any changes but somehow CheckAvailability for Transfer stopped working properly.
      Couldn't find any detailed documentation, any help would be much appreciated!
    • By spartanza
      As the title says, I would like the ability to hide the "I will use my existing domain and update my nameservers" option on the domain sign up on specific services only
    • By So, who am I ?
      Hello
      I need to add bulk domain transfer,  I've searched it and found out that WHMCS removed bulk domain transfer in version 7.0.
      Registrar has a method that generates one EPP Code for all user's domains and user can transfer them all at a time.
       
      I know it's removed but maybe there's any other way of doing it without downgrading to version 6.0
    • By So, who am I ?
      Hello
      I'm adding a new registrar and have problem with checking domain availability and transferring domain, cuz registrar doesn't have a proper whois and as they said they don't know how up time it will be in the future, so I need to work the way around it.
       
      WHMCS documentation says:
       
      my WHMCS version is: 7.1.1
      I thought to use CheckAvailability to send requests to registrar service without using whois so I tried it but it doesn't work at all, the system doesn''t even go to the method.
       
      is there any way I can check domain availability without whois ? and does it matter what Order Form Template I use ?
  • 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