0 ? 'no_purchased_incl' : 'no_purchased'); if (Configuration::updateValue('ETS_RV_WHO_POST_RATING', implode(',', $rating))) { Configuration::deleteByName('ETS_RV_PURCHASED_PRODUCT'); Configuration::deleteByName('ETS_RV_PURCHASED_PRODUCT_RATE'); } Configuration::updateValue('ETS_RV_RECORDED_ACTIVITIES', 'rev,que,lie,rpt'); $execCmd = $object->_installConfigs(EtsRVDefines::getInstance()->getAutoConfigs()); $execCmd &= Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ets_rv_email_queue`( `id_ets_rv_email_queue` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `guid` varchar(128) NOT NULL, `id_lang` INT(11) UNSIGNED NOT NULL, `template` varchar(255) NOT NULL, `to` varchar(64) DEFAULT NULL, `to_email` varchar(255) NOT NULL, `to_name` varchar(255) DEFAULT NULL, `template_vars` text NOT NULL, `subject` varchar(500) NOT NULL, `sent` tinyint(1) UNSIGNED DEFAULT 0, `sending_time` datetime DEFAULT NULL, `send_count` int(1) UNSIGNED NOT NULL DEFAULT 0, `schedule_time` int(11) UNSIGNED NOT NULL DEFAULT 0, `is_read` tinyint(1) UNSIGNED DEFAULT 0, `delivered` tinyint(1) UNSIGNED DEFAULT 0, PRIMARY KEY (`id_ets_rv_email_queue`), KEY `idx_id_lang` (`id_lang`), KEY `idx_sent` (`sent`), KEY `idx_to_email` (`to_email`) ) ENGINE = ' . _MYSQL_ENGINE_ . ' CHARSET = utf8mb4;'); $execCmd &= Db::getInstance()->execute(' ALTER TABLE `' . _DB_PREFIX_ . 'ets_rv_product_comment` ADD `id_country` INT(11) NOT NULL DEFAULT 0 AFTER `question`, ADD `verified_purchase` varchar(6) NOT NULL AFTER `id_country`; '); if ($execCmd) { $verified_purchase = trim(Configuration::get('ETS_RV_VERIFIED_PURCHASE')); if ($verified_purchase !== 'no' && $verified_purchase !== 'yes') $verified_purchase = 'auto'; $execCmd &= Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'ets_rv_product_comment` SET `verified_purchase`=\'' . pSQL($verified_purchase) . '\' WHERE `question` = 0'); $execCmd &= Configuration::deleteByName('ETS_RV_VERIFIED_PURCHASE'); $execCmd &= Db::getInstance()->execute(' UPDATE `' . _DB_PREFIX_ . 'ets_rv_product_comment` pc INNER JOIN ( SELECT `id_customer`, `id_country` FROM `' . _DB_PREFIX_ . 'address` WHERE `active` = 1 AND `deleted` < 1 AND `id_customer` > 0 GROUP BY `id_customer` ) a ON (a.`id_customer` = pc.`id_customer`) SET pc.`id_country` = a.`id_country` WHERE pc.`id_customer` > 0 AND a.`id_customer` > 0 AND pc.`question` = 0 '); } $execCmd &= Db::getInstance()->execute(' ALTER TABLE `' . _DB_PREFIX_ . 'ets_rv_product_comment_cart_rule` ADD `id_customer` INT(11) UNSIGNED NOT NULL DEFAULT 0 AFTER `id_product`; '); return $execCmd; }