Jump to content

Get Countrycode in viewinvoice


J-B

Recommended Posts

Hello, 

i want to get the countrycode of the user in the viewinvoice. If the user is from "DE" then do something.

<?php

function viewinvoice_loggedin_status_hook($vars)
{
        $countrycode = $params['clientsdetails']['country'];
        if ($countrycode == 'DE') {

  
  ....
    
    
}

add_hook("ClientAreaPageViewInvoice", 1, "viewinvoice_loggedin_status_hook");

Anyone an idea what's wrong?

Link to comment
Share on other sites

Many would agree, myself included. Extremely helpful and knew a thing or two. 😉
Several here on par with him for the most part, but not always around, again, mostly due to the reprehensible licensing changes 'round here (I'm guessing).

Link to comment
Share on other sites

On 24/05/2022 at 11:34, J-B said:

do you have a idea or solution?

I don't get email notifications any more for posts and/or mentions (I disabled them last year) - so mentioning me in a thread, in the hope that I will see it, is really not worth doing.

On 24/05/2022 at 11:39, bear said:

Brian! essentially retired from this board a while back. Though he did say he'd (very) occasionally drop in, it's unlikely a good plan to wait for him. Sorry. 

here I am... hello everyone! wave-smiley.gif

I hope everyone is doing well - i've literally no idea what has been posted in this place over the last year... I enjoy living my life in ignorance of this place for the most part! 😎

On 24/05/2022 at 19:57, bear said:

Many would agree, myself included. Extremely helpful and knew a thing or two. 😉

yes - I knew two things... one of them i've sadly now forgotten and the second i've carelessly misplaced. 😜

On 24/05/2022 at 19:57, bear said:

Several here on par with him for the most part, but not always around, again, mostly due to the reprehensible licensing changes 'round here (I'm guessing).

others will be your best bet now... my time visiting this place on a regular basis ended last year and my knowledge is fading... and as much as I could get back into the habit of coming here, I won't as there are much more enjoyable things to do. 🏝️

all that said, many months ago I did get asked to code an action hook that completely rewrites the v8 admin menu into something more sensibly organised and useful.... works on v8.3 and as there were no admin changes, I assume it works on v8.4... and seeing no specific admin changes in the changelogs (though experience tells you that might not necessarily mean that there aren't any lol), it should probably work in v8.5.... screenshot below is a little overkill as all display options are enabled (which you wouldn't really do normally), but topbar / stats bar / menus can all be individually enabled or their content changed... the damn thing has over 1k+ lines of code, but should continue to work regardless of using WHMCS.

7i6nmKR.gif

the irony is that having written it, I no longer personally have any need to run v8 as I don't use it myself and am not actively answering questions in this place anymore. 🙄

perhaps when v8.5 goes GA (or I suppose if things haven't changed at WHMCS, I should probably wait for the first v8.5.1 maintenance release lol) and if the inclination hits me, i'll test it again and perhaps post it on GitHub.

thanks to @DennisHermannsen for posting a solution.

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