Jump to content

Store variable, how to globally call it?


Recommended Posts

Hi,

 

Newbie question here....

 

I am trying to do an if statement within the ProductController.php inside here

protected function assignPriceAndTax()

Right now I am using language, which I can access like this:

if ($this->context->language->id == 1) { 
/// Do Something
}

But instead of using the current language id, I would like to use the current store id.

Is it possible or do I need to change something elsewhere?

 

So, basically trying to get at:

if ($this->context->store->id == 1) { 
/// Do Something
}

But since the above isn't working, I'm thinking I don't know what I am doing...

 

Thank you for any help.

 

Link to comment
Share on other sites

×
×
  • Create New...