* @copyright 2007-2014 PrestaShop SA * @license http://addons.prestashop.com/en/content/12-terms-and-conditions-of-use * @link http://addons.prestashop.com/2376-coupons-discount-vouchers.html * International Registered Trademark & Property of PrestaShop SA */ if (!defined('_PS_VERSION_')) { exit; } /** * Upgrade method from 3.x.x * * @param Object $object Module instance * * @return bool **/ function upgrade_module_3_1_1($module) { $currentController = Context::getContext()->controller; $errorMessage = 'Failed to update atos configuration during 3.1.1 upgrade:'; try { return Configuration::updateValue('ATOS_TEMPLATE_NAME', 'mytemplate'); } catch (PrestaShopDatabaseException $e) { $currentController->_errors[] = $module->l('Failed to update module. Please see the logs for more details.'); if (version_compare(_PS_VERSION_, '1.6.0.3', '>=')) { PrestaShopLogger::addLog( $errorMessage.$e->getMessage(), 4, null, 'Atos', isset($module->id) ? $module->id : null, true ); } else { Logger::addLog( $errorMessage.$e->getMessage(), 4, null, 'Atos', isset($module->id) ? $module->id : null, true ); } return false; } }