Jump to content

How to use Configuration::updateValue and Configuration::get for multistore


JoelWebsites

Recommended Posts

I am trying to use Configuration::updateValue but it seems that the value for id_shop is getting set to null can anyone show me how to use it for multistore with an easy example?

 

 

How to set and get value for a key on the basis of the shop context ..

 

I used 

 

Configuration::updateValue($key, Tools::getValue($key),false,1,1);

 

but the value for the column id_shop in  ps_configuration as well as shop group are null

 

it did not help.

Link to comment
Share on other sites

  • 3 months later...

Basically, in your code, if you use the Configuration class (Configuration::updateValue() for example), your changes will be applied for the current store. If you want to make changes for all the stores, you will have to you set/get the context, for example :

if (Shop::isFeatureActive())  Shop::setContext(Shop::CONTEXT_ALL);

marius

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