Makros
Makros

Reputation: 352

Enabling Prestashop webservices on module install

I'm trying to develop a module to sync 2 or more Prestashop stores via webservices. I've made a module skeleton thanks to this module generator but now, first steps take me to the question:

How can I auto-switch on webservices on my custom module installation?

Upvotes: 0

Views: 441

Answers (2)

Knowband Plugins
Knowband Plugins

Reputation: 1317

You can add the following line of code to the install() function of your module:

Configuration::updateGlobalValue('PS_WEBSERVICE', '1');

Upvotes: 0

PH_Laza
PH_Laza

Reputation: 111

To autoswitch web services in PrestaShop I think you just need in your module install() function to update PS_WEBSERVICE value like this

Configuration::updateValue('PS_WEBSERVICE', true);

Upvotes: 1

Related Questions