Jump to content

get store country using $this->context


Recommended Posts

  • 2 weeks later...
On 16/11/2017 at 11:28 AM, zohaib82 said:


I want to get store country name which is set at the time of installation and back-office configuration.

I tried below but no success.

echo"<br>Store Country=>".$this->context->country;


Below documentation link


Any Idea?



Try this:

global $cookie;
$LanguageIso = Language::getIsoById( (int)$cookie->id_lang );
echo $LanguageIso;


Link to comment
Share on other sites

Hi bellini13

It is not a question, I mean it shows country from localization default country.This is to share information from where store default country will be shown in variable.

Many thanks Inform-All for code. Do you have any idea about getting unique browser session id using cookies in prestashop.

Below code helps to get unique session id using php default functions.



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...