Jump to content
  • 0

Domain Availability Checker Widget + Counter


Question

Hello,

Can you guys help me to tell the procedure to add simple domain availability search widget in client portal?

And need the procedure also to add services, tickets, domains, tickets counter on client portal. I've uploaded client_data plugin but can't figuring out how to use ajax codes to call counter. Need help in this issue :blesta:

Screenshot_20171103-033016.thumb.jpg.11e5ad466b67c22b9c85ff953ea35f29.jpg

Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0
16 minutes ago, Blesta Addons said:

if the help is free, then is better to stay in the post, so others can maybe found it useful for him. if is paid so PM is ok .

Something like this would have been easier over a teamviewer meeting, but i will get something together to answer all his questions here in this thread to help all

Link to post
Share on other sites
  • 0

I have updated the client_data plugin to also support Domain Counts and Support manager Pro ticket counts (still has default support manager counter as well) You may download it here.

 

Here are examples of calls depending on which one you require for your theme. 

<?php

		$this->Javascript->setInline('
			$(document).ready(function() {
				fetchCountServices();

			});

			function fetchCountServices() {
				$(this).blestaRequest("GET", "' . $this->Html->safe($this->base_url . "plugin/client_data/client_main/count_services/active") . '", null, function(data) {
					
						$("#services_count").html(data);
				},
				null,
				{dataType:"json"});
			}
		');
		?>


		<?php
		$this->Javascript->setInline('
			$(document).ready(function() {
				fetchInvoices("open");
			});
			
			function fetchInvoices(status) {
				$(this).blestaRequest("GET", "' . $this->Html->safe($this->base_url . "plugin/client_data/client_main/count_invoices/") . '" + status, null, function(data) {
					
						$("#invoices_count").html(data);
				},
				null,
				{dataType:"json"});
			}
		');
		?>

<?php

		$this->Javascript->setInline('
			$(document).ready(function() {
				fetchCountTickets();

			});

			function fetchCountTickets() {
				$(this).blestaRequest("GET", "' . $this->Html->safe($this->base_url . "plugin/client_data/client_main/count_pro_tickets/open") . '", null, function(data) {
					
						$("#tickets_count").html(data);
				},
				null,
				{dataType:"json"});
			}
		');
		?>

<?php

		$this->Javascript->setInline('
			$(document).ready(function() {
				fetchCountDomains();

			});

			function fetchCountDomains() {
				$(this).blestaRequest("GET", "' . $this->Html->safe($this->base_url . "plugin/client_data/client_main/count_domains/") . '", null, function(data) {
					
						$("#domains_count").html(data);
				},
				null,
				{dataType:"json"});
			}
		');
		?>

Sorry formatting went off by a bit. $("#div_id_to_replace_here") is what tells the ajax which div to update

which ever Request you want should be added around the bottom of structure.pdt (i have seperated requests individually above) before   <?php echo $this->Javascript->getInline();?

Link to post
Share on other sites
  • 0
15 minutes ago, gosuhost said:

I have updated the client_data plugin to also support Domain Counts and Support manager Pro ticket counts (still has default support manager counter as well) You may download it here.

For domains count is a bit confused, your code will work only if this related to logicboxes module, so enom or any other registrar module will not count their domains, for that reason i have not added such features .

also using the Record class inside the controller is bad practice i suggest use a custom model to call it .

we are working in a bootstrap v4  admin theme, we have found a way to get all the domains for multiple registrar and maybe i will ad it to the client_data soon with a lot of other stats staff .

anyway i highly appreciate your work to help others and provide free staff. you are in the correct road of :blesta: .

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
Answer this question...

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

Loading...
×
×
  • Create New...