Jump to content

Client GPS Coordinates on ADMIN client summary page


zitu4life

Recommended Posts

Hello There

I was thinking a way to have GPS coordinates on client summary page. Have anyone ever thing in such idea is possible to be implemented?  I have tried to create client custom fields, so when we edit client details. Obviously will need client consent for having that coordinates, but anyway address can bee linked to maps for example, so I do not see any issue related client privacy.

So I could create custom fields in Setup>Client Custom fields

image.thumb.png.6641c1084bd27057ec85e313a8b1e3df.png

I was thinking a way that could be linked to google maps for example or google earth, there is a simple way to do that or out-there a module that could do such a think? or workaround?

 

Edited by zitu4life
Link to comment
Share on other sites

5 hours ago, zitu4life said:

I was thinking a way to have GPS coordinates on client summary page.

why?

5 hours ago, zitu4life said:

Have anyone ever thing in such idea is possible to be implemented?

there was a Google Map script after 7 years ago - but they're no longer around...

5 hours ago, zitu4life said:

I was thinking a way that could be linked to google maps

the API for Google Maps isn't free.

Link to comment
Share on other sites

8 minutes ago, brian! said:

why?

I usually use WHMCS for client managment for hosting purposes and for other IT  business too...so I have created a department staff that usually has a login to admin with a few admin roles permitions, but this staff have ability se clients, I also has a edited client summary page for that staff too. So this staff has a company car to run eventually support on companys client (made trobleshoting, new setup, etc, etc, )so WHMCS helps me a lot to manage that...because staff known how to get client adress and locations...So GPS would just be an good future, but I still live without that.

Link to comment
Share on other sites

@zitu4life - if all you want to do is add a Google Maps link, based on the client's post/zip code, then you can do that in a normal link in the clientsummary.tpl template...

{if $clientsdetails.postcode}<a href="https://google.com/maps?q={$clientsdetails.postcode}">Google Maps Link</a>{/if}

with a bit of effort, you could probably add it to the "Other Options" panel on the client summary page using an ActionLinks hook too.

Link to comment
Share on other sites

 

2 hours ago, brian! said:

@zitu4life - if all you want to do is add a Google Maps link, based on the client's post/zip code, then you can do that in a normal link in the clientsummary.tpl template...


{if $clientsdetails.postcode}<a href="https://google.com/maps?q={$clientsdetails.postcode}">Google Maps Link</a>{/if}

with a bit of effort, you could probably add it to the "Other Options" panel on the client summary page using an ActionLinks hook too.

Looks Great, it is a really great starts, like that!! postcode will be same for all clients for my specific case, so...

option 1 is a hook ensure all client will have post code wanted number:

option 2 is editing above code to point directly to a wanted postcode instead of inspecting on zipcode client form, how? if zipcode is 01234 (example).

I have tested link in my dev installation.

Is that possible to apply CSS on link you create, I made my CSS drawing on windows paint 😁, but code it do not know how to apply it!

background color, text color.

 

image.png.17162c0b70a85082020fd2f2fee40627.png

It could not appear important but until a staff doesn't have a full GPS equipment this workaround will ensure reducing time work and it means money save!!

Edited by zitu4life
Link to comment
Share on other sites

Another idea I got now is... I could create a custom client field named GPS Client Address, and your link above would be changed to read GPS Client Address field and with that I got all client exact position, so when a staff click in your image.png.dad30d6fa8d9b11e5061fe68a90dc705.png will be forward direct to client address...this is very useful because once I enter GPS Client Address field my staff will know exactly where is client position (home or business office) and once there he could just give a client a call as last resource if needed to find a Apt or door number, but as Adress is already present in client field everything is fine.

So how I Want it to work:

1- Create a Custom field

image.thumb.png.f4cd3dd821aeab63c99dfd3c1fbd15e2.png

change code to point to this new custom field created only.

3 hours ago, brian! said:

{if $GPS Client Address}<a href="https://google.com/maps?q={$clientsdetails.postcode}">Google Maps Link</a>{/if}

I do not how to change code to point to that!

Once it is implemented. I will go manually on every client and edit this custom field GPS ( I will use google earth to take that position, because I already know its exact location, example this could be a GPS client address format 17TNE6874781576 (MGRS-Military Grid Reference System) and google maps link knows exactly where it is located once you click on client summary page.

image.thumb.png.89541766970efe3ee4b14f4e0394eae7.png

 

I have tested it and works fine and as expected!! So your help is need to modify code to point to custom client field, apply a CSS url link to looks friendly, and an ultimately is if this code can be used on a hook to have it on every single WHMCS update version...so we just create a interesting module idea.😊😉

With that once I edited all clients position (one time bored work) and create internal policy that new clients should has GPS information, even if I hire new staffs, new staff still have the ability to work quickly and alone, because WHMCS helps me provide that information easy. PS: yes I know my clients, so I will be adding clients on Admin side with their consent, so no issue with that.

With that I could go vocation without worry, staffs send emails that they do not remember clients office location 😅

@brian! wish you all the best!!! I think if we get partnered we could get rich together 😂😉

 

 

 

 

Edited by zitu4life
Link to comment
Share on other sites

16 hours ago, zitu4life said:

Looks Great, it is a really great starts, like that!! postcode will be same for all clients for my specific case, so...

ah that's a shame. 😞

16 hours ago, zitu4life said:

option 1 is a hook ensure all client will have post code wanted number:

shouldn't be necessary, just don't make postcode an optional field in general settings -> other and it will be required... though that won't help if the client already exists and they haven't entered a postcode.

16 hours ago, zitu4life said:

Is that possible to apply CSS on link you create, I made my CSS drawing on windows paint 😁, but code it do not know how to apply it!

four options I can think of...

  1. edit the clientsummary.tpl template - if you've already customised it, then another custom won't hurt.
  2. use an AdminAreaClientSummaryPage hook - with that, the text would be shown below the users name - but you can use html/css in the output.
  3. use an admin sticky note - that will create a yellow box above the profile that will be shown on every page of the client summary.... that would require a hook to do it properly I think.
  4. use a client custom field as you originally suggested.
17 hours ago, zitu4life said:

I have tested it and works fine and as expected!! So your help is need to modify code to point to custom client field, apply a CSS url link to looks friendly, and an ultimately is if this code can be used on a hook to have it on every single WHMCS update version...so we just create a interesting module idea.😊😉

as Smarty in the clientsummary.tpl template, it would be...

{if $clientsdetails.customfieldsXXX}<span style="background-color: #00FF00"><a href="https://google.com/maps?q={$clientsdetails.customfieldsXXX}">Google Maps</a></span>{/if}

now here's the tricky part for you - you need to find out what XXX is... it will be the location value of the customfield in the client summary profile... counting left to right...

4WtVWhs.png

so the GPS custom field is 12th on the list and therefore in my dev, the code would be...

{if $clientsdetails.customfields12}<span style="background-color: #00FF00"><a href="https://google.com/maps?q={$clientsdetails.customfields12}">Google Maps</a></span>{/if}

kckRIJv.png

ignore the globe for now as it's not in the above code, but you could hyperlink a FontAwesome icon instead of using a text link. 🌍

also, if you could change the display order values of the CCF in the customfield setup page, configcustomfields.php, make this GPS field have a display value of 0, and give any other custom fields increasing display values, then you could move this field to the start and it's code value would be 1 instead of 12...

{if $clientsdetails.customfields1}<span style="background-color: #00FF00"><a href="https://google.com/maps?q={$clientsdetails.customfields1}">Google Maps</a></span>{/if}

ultimately, you could do it as a hook, but in the template all the variables are there for you to use immediately... with a hook, you only have the clients user ID - so you'd have to query the database for any other information you required - e.g the specific GPS custom field.

assuming that there is going to be another maintenance release this month, v7.8.2, then I would have thought it very possible that there won't be any more WHMCS updates for the rest of the year.

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