PhpMadman Posted August 27, 2014 Share Posted August 27, 2014 (edited) Hi. I'm currently working on a module where I want a configuration value to be set to ALL shops, even if the employee has switched to a specific shop / group in BO. How can I do that? Edited August 28, 2014 by PhpMadman (see edit history) Link to comment Share on other sites More sharing options...
PhpMadman Posted August 28, 2014 Author Share Posted August 28, 2014 If no better idea... My idea is to foreach the shop groups and set the configuration for every shop. I'm hoping that it's possible to set one configuration line in the db Along the lines KEY, ALL GROUPS, ALL SHOPS instead of KEY, GROUP, SHOP1 KEY, GROUP, SHOP2 KEY, GROUP, SHOP3 KEY, GROUP, SHOP4 Link to comment Share on other sites More sharing options...
PhpMadman Posted August 28, 2014 Author Share Posted August 28, 2014 (edited) Solved myself. Shop grup and shop id should be set to 0 Configuration::updateValue('PS_MOD_ROLLIN_PRODUCTS',Tools::getValue('PS_MOD_ROLLIN_PRODUCTS'), null, 0, 0); Sometimes it's just to easy Edited August 28, 2014 by PhpMadman (see edit history) 1 Link to comment Share on other sites More sharing options...
Eolia Posted August 28, 2014 Share Posted August 28, 2014 Configuration::updateGlobalValue($key, $values); 1 Link to comment Share on other sites More sharing options...
PhpMadman Posted August 28, 2014 Author Share Posted August 28, 2014 Ha! I should probaly not scroll so fast when reading the class files... Link to comment Share on other sites More sharing options...
joseantgv Posted June 14, 2018 Share Posted June 14, 2018 On 28/8/2014 at 8:14 PM, PhpMadman said: Solved myself. Shop grup and shop id should be set to 0 Configuration::updateValue('PS_MOD_ROLLIN_PRODUCTS',Tools::getValue('PS_MOD_ROLLIN_PRODUCTS'), null, 0, 0); Sometimes it's just to easy This is the same than @Eolia answered you here https://www.prestashop.com/forums/topic/353725-solved-global-configuration-updatevalue-on-multistores/?do=findComment&comment=1779270 public static function updateGlobalValue($key, $values, $html = false) { return Configuration::updateValue($key, $values, $html, 0, 0); } Link to comment Share on other sites More sharing options...
PhpMadman Posted June 14, 2018 Author Share Posted June 14, 2018 Uhmm. Thank you. I guess? Any special reason for activating this 4 year old thread? Link to comment Share on other sites More sharing options...
Eolia Posted June 14, 2018 Share Posted June 14, 2018 Just to add a notification to @eolia i think Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now