function postProcess() { // Reset Image if they have modification on the size if ($this->ebay_profile->getConfiguration('EBAY_PICTURE_SIZE_DEFAULT') != (int) Tools::getValue('sizedefault') || $this->ebay_profile->getConfiguration('EBAY_PICTURE_SIZE_SMALL') != (int) Tools::getValue('sizesmall') || $this->ebay_profile->getConfiguration('EBAY_PICTURE_SIZE_BIG') != (int) Tools::getValue('sizebig')) { EbayProductImage::removeAllProductImage(); } // Saving new configurations $picture_per_listing = (int) Tools::getValue('picture_per_listing'); if ($picture_per_listing < 0) { $picture_per_listing = 0; } if ($this->ebay_profile->setConfiguration('EBAY_PICTURE_SIZE_DEFAULT', (int) Tools::getValue('sizedefault')) && $this->ebay_profile->setConfiguration('EBAY_PICTURE_SIZE_SMALL', (int) Tools::getValue('sizesmall')) && $this->ebay_profile->setConfiguration('EBAY_PICTURE_SIZE_BIG', (int) Tools::getValue('sizebig')) && $this->ebay_profile->setConfiguration('EBAY_PICTURE_PER_LISTING', $picture_per_listing) && $this->ebay->setConfiguration('EBAY_API_LOGS', Tools::getValue('api_logs') ? 1 : 0) && $this->ebay->setConfiguration('EBAY_ACTIVATE_LOGS', Tools::getValue('activate_logs') ? 1 : 0) && Configuration::updateValue('EBAY_SYNC_PRODUCTS_BY_CRON', 'cron' === Tools::getValue('sync_products_mode')) && Configuration::updateValue('EBAY_SYNC_ORDERS_BY_CRON', 'cron' === Tools::getValue('sync_orders_mode')) && Configuration::updateValue('EBAY_SEND_STATS', Tools::getValue('stats') ? 1 : 0, false, 0, 0) && Configuration::updateValue('EBAY_ORDERS_DAYS_BACKWARD', (int) Tools::getValue('orders_days_backward'), false, 0, 0) && Configuration::updateValue('EBAY_LOGS_DAYS', (int) Tools::getValue('logs_conservation_duration'), false, 0, 0)) { if (Tools::getValue('activate_logs') == 0) { if (file_exists(dirname(__FILE__) . '/../../log/request.txt')) { unlink(dirname(__FILE__) . '/../../log/request.txt'); } } return $this->ebay->displayConfirmation($this->ebay->l('Settings updated')); } else { return $this->ebay->displayError($this->ebay->l('Settings failed')); } }
* It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <*****@*****.**> * @copyright 2007-2015 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ include dirname(__FILE__) . '/../../../config/config.inc.php'; if (!Tools::getValue('token') || Tools::getValue('token') != Configuration::get('EBAY_SECURITY_TOKEN')) { die('ERROR: Invalid Token'); } include dirname(__FILE__) . '/../classes/EbayProductImage.php'; if (Tools::getValue('action') == 'delete-all') { if (EbayProductImage::removeAllProductImage() === true) { echo 'success'; } else { echo 'error'; } } else { die('ERROR: Invalid arguments'); }