first commit

This commit is contained in:
2024-10-28 22:14:22 +01:00
commit b65352c452
40581 changed files with 5712079 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_1_1($module)
{
$upgrade = $module->upgrade;
// configuration update (yes)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,55 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_3_0($module)
{
$upgrade = $module->upgrade;
// hooks update (yes)
$upgrade->registerHook('displayHeader');
$upgrade->registerHook('actionCustomerAccountAdd');
// configuration update (yes)
$upgrade->deletePSConfiguration('PS_NEWSLETTER_PRO_TEMPLATE');
$upgrade->deletePSConfiguration('PS_NEWSLETTER_PRO_P_TEMPLATE');
$upgrade->deletePSConfiguration('PS_NEWSLETTER_PRO_IMAGE_TYPE');
$upgrade->deletePSConfiguration('PS_NEWSLETTER_PRO_SLEEP');
$upgrade->deletePSConfiguration('PS_NEWSLETTER_PRO_CURRENCY');
$upgrade->deletePSConfiguration('PS_NEWSLETTER_PRO_LANG');
$upgrade->updateConfiguration('NEWSLETTER_TEMPLATE', 'sample.html');
$upgrade->updateConfiguration('PRODUCT_TEMPLATE', 'sample.html');
$type_home = 'home';
$upgrade->updateConfiguration('IMAGE_TYPE', ($module->isLowerVersion('1.5.1.0') ? $type_home : $type_home.'_default'));
$upgrade->updateConfiguration('SLEEP', '3');
$upgrade->updateConfiguration('CURRENCY', (int) Configuration::get('PS_CURRENCY_DEFAULT'));
$upgrade->updateConfiguration('LANG', (int) Configuration::get('PS_LANG_DEFAULT'));
$upgrade->updateConfiguration('CATEGORIES_DEPTH', ($module->isLowerVersion('1.5.0.5') ? 1 : 2));
// database update (yes)
$upgrade->addColumn('newsletter_pro_email', 'id_shop', "`id_shop` INT(10) UNSIGNED NOT NULL DEFAULT '1'", 'id_newsletter_pro_email');
$upgrade->addColumn('newsletter_pro_email', 'id_shop_group', "`id_shop_group` INT(10) UNSIGNED NOT NULL DEFAULT '1'", 'id_shop');
return $upgrade->success();
}

View File

@@ -0,0 +1,43 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_6_0($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (yes)
// the last value was 3, uncomment the line if you want to chage it to 1
// $upgrade->updateConfiguration('SLEEP', '1');
$upgrade->updateConfiguration('DISPLAY_PRODUCT_IMAGE', '1');
// database update (yes)
$upgrade->addColumn('newsletter_pro', 'id_step', "`id_step` INT(11) UNSIGNED NOT NULL DEFAULT '0'", 'id_newsletter_pro');
$upgrade->addColumn('newsletter_pro', 'count_to_send', "`count_to_send` INT(11) UNSIGNED NOT NULL DEFAULT '0'", 'active');
$upgrade->addColumn('newsletter_pro', 'count_sent_succ', "`count_sent_succ` INT(11) UNSIGNED NOT NULL DEFAULT '0'", 'count_to_send');
$upgrade->addColumn('newsletter_pro', 'count_sent_err', "`count_sent_err` INT(11) UNSIGNED NOT NULL DEFAULT '0'", 'count_sent_succ');
$upgrade->addColumn('newsletter_pro_email', 'active', "`active` TINYINT(1) NOT NULL DEFAULT '1'", 'date_add');
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_6_2($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,51 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_7_1($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (yes)
$upgrade->updateConfiguration('VIEW_ACTIVE_ONLY', '1');
$upgrade->updateConfiguration('CUSTOMER_CONFIRM_ON_DELETE', '1');
$upgrade->updateConfiguration('DISPLAY_ACTIVE_COLUMN', '1');
$upgrade->updateConfiguration('DISPLAY_ACTIONS_COLUMN', '0');
// database update (yes)
$upgrade->changeColumn('newsletter_pro', 'id_newsletter_pro', '`id_newsletter_pro` int(11) UNSIGNED NOT NULL AUTO_INCREMENT');
$upgrade->changeColumn('newsletter_pro', 'emails_to_send', '`emails_to_send` LONGTEXT');
$upgrade->changeColumn('newsletter_pro', 'emails_sent', '`emails_sent` LONGTEXT');
$upgrade->addIndex('newsletter_pro', 'id_step');
$upgrade->changeColumn('newsletter_pro_email', 'id_newsletter_pro_email', '`id_newsletter_pro_email` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT');
$upgrade->addColumn('newsletter_pro_email', 'id_lang', '`id_lang` INT(10) UNSIGNED NULL DEFAULT NULL', 'id_shop_group');
$upgrade->addColumn('newsletter_pro_email', 'firstname', '`firstname` VARCHAR(32) NULL DEFAULT NULL', 'id_lang');
$upgrade->addColumn('newsletter_pro_email', 'lastname', '`lastname` VARCHAR(32) NULL DEFAULT NULL', 'firstname');
$upgrade->changeColumn('newsletter_pro_email', 'email', '`email` VARCHAR(255) NOT NULL');
$upgrade->addColumn('newsletter_pro_email', 'ip_registration_newsletter', '`ip_registration_newsletter` VARCHAR(15) NULL DEFAULT NULL', 'email');
$upgrade->changeColumn('newsletter_pro_email', 'date_add', '`date_add` DATETIME DEFAULT NULL');
$upgrade->addIndex('newsletter_pro_email', 'id_shop');
$upgrade->addIndex('newsletter_pro_email', 'id_lang');
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_7_3($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_7_5($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_7_6($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,41 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_8_0($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
$upgrade->updateConfiguration('SMTP_ACTIVE', 0);
$upgrade->updateConfiguration('SMTP', [
'PS_MAIL_DOMAIN' => '',
'PS_MAIL_SERVER' => '',
'PS_MAIL_USER' => '',
'PS_MAIL_PASSWD' => '',
'PS_MAIL_SMTP_ENCRYPTION' => '',
'PS_MAIL_SMTP_PORT' => '',
]);
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,40 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_8_1($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
$upgrade->unregisterHook('displayHeader');
$upgrade->registerHook('header');
// configuration update (no)
$upgrade->updateConfiguration('GOOGLE_ANALYTICS_ID', '');
$upgrade->updateConfiguration('GOOGLE_ANALYTICS_ACTIVE', '0');
$upgrade->updateConfiguration('CAMPAIGN_ACTIVE', '0');
$upgrade->updateConfiguration('NO_DISPLAY_NUMBER', '5000');
$upgrade->updateConfiguration('PRODUCT_LINK_REWRITE', '1');
$upgrade->updatePSConfiguration('NEWSLETTER_PRO_CAMPAIGN', "utm_source=Newsletter\nutm_medium=email\nutm_campaign={newsletter_title}\nutm_content={product_name}", false, 0, 0);
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_8_2($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// uncoment the line if you want to change the customer configuation
$upgrade->updateConfiguration('PRODUCT_LINK_REWRITE', '1');
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_8_3($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
$upgrade->updateConfiguration('DISPLAY_ACTIONS_COLUMN', '1');
$upgrade->updateConfiguration('CAMPAIGN', $module->default_campaign_params);
$upgrade->updatePSConfiguration('NEWSLETTER_PRO_CAMPAIGN', '', false, 0, 0);
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,31 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_8_4($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,81 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_9_0($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// uncoment this settings to override the customer sleep time
// $upgrade->updateConfiguration('SLEEP', '3');
$upgrade->updateConfiguration('TOKEN', $module->token);
$upgrade->updateConfiguration('RUN_MULTIPLE_TASKS', '0');
$upgrade->updateConfiguration('SMTP', '0');
// database update (no)
$upgrade->createTable('newsletter_pro_smtp', '
`id_newsletter_pro_smtp` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(64) NOT NULL,
`domain` VARCHAR(255) NULL DEFAULT NULL,
`server` VARCHAR(255) NULL DEFAULT NULL,
`user` VARCHAR(255) NOT NULL,
`passwd` VARCHAR(255) NULL DEFAULT NULL,
`encryption` VARCHAR(255) NULL DEFAULT NULL,
`port` VARCHAR(255) NULL DEFAULT NULL,
PRIMARY KEY (`id_newsletter_pro_smtp`),
UNIQUE INDEX `name` (`name`)
');
$upgrade->createTable('newsletter_pro_task', "
`id_newsletter_pro_task` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_newsletter_pro_smtp` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`date_start` DATE NULL DEFAULT NULL,
`active` INT(1) NOT NULL DEFAULT '0',
`template` VARCHAR(128) NOT NULL,
`status` INT(10) NOT NULL DEFAULT '0',
`sleep` INT(10) NOT NULL DEFAULT '3',
`emails_count` INT(10) NOT NULL DEFAULT '0',
`emails_error` INT(10) NOT NULL DEFAULT '0',
`emails_success` INT(10) NOT NULL DEFAULT '0',
`emails_completed` INT(10) NOT NULL DEFAULT '0',
`done` INT(10) NOT NULL DEFAULT '0',
`error_msg` LONGTEXT NOT NULL,
PRIMARY KEY (`id_newsletter_pro_task`)
");
$upgrade->createTable('newsletter_pro_task_step', "
`id_newsletter_pro_task_step` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_newsletter_pro_task` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`step` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`step_active` INT(1) NOT NULL DEFAULT '0',
`emails_to_send` LONGTEXT NULL,
`emails_sent` LONGTEXT NULL,
`date` DATETIME NULL DEFAULT NULL,
PRIMARY KEY (`id_newsletter_pro_task_step`),
INDEX `id_step` (`step`),
INDEX `id_task` (`id_newsletter_pro_task`)
");
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_9_1($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_9_2($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
$upgrade->addColumn('newsletter_pro', 'id_newsletter_pro_tpl_history', "`id_newsletter_pro_tpl_history` INT(11) UNSIGNED NOT NULL DEFAULT '0'", 'id_step');
$upgrade->addColumn('newsletter_pro_task', 'id_newsletter_pro_tpl_history', "`id_newsletter_pro_tpl_history` INT(10) UNSIGNED NOT NULL DEFAULT '0'", 'id_newsletter_pro_smtp');
return $upgrade->success();
}

View File

@@ -0,0 +1,39 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_9_3_1($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
$upgrade->createTable('newsletter_pro_tpl_history', "
`id_newsletter_pro_tpl_history` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`template` LONGTEXT NULL,
`active` INT(1) NULL DEFAULT '1',
PRIMARY KEY (`id_newsletter_pro_tpl_history`)
");
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_9_3($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_9_4_1($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_9_4_2($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_9_4_3($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_9_4_4($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
$upgrade->updateConfiguration('FUNC_MAIL_ACTIVE', '0');
// database update (no)
$upgrade->addColumn('newsletter_pro_task', 'send_method', "`send_method` ENUM('mail','smtp') NOT NULL DEFAULT 'mail'", 'template');
return $upgrade->success();
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_9_4($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
$upgrade->updateConfiguration('ONLY_ACTIVE_PRODUCTS', '1');
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_9_6_0($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_1_9_6_1($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,223 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_1_6($module)
{
$upgrade = $module->upgrade;
// hooks update (no)
$upgrade->registerHook('customerAccount');
$upgrade->registerHook('createAccount');
// configuration update (no)
$upgrade->deleteConfiguration('NO_DISPLAY_NUMBER');
$upgrade->deleteConfiguration('CUSTOMER_CONFIRM_ON_DELETE');
$upgrade->deleteConfiguration('DISPLAY_ACTIVE_COLUMN');
$upgrade->deleteConfiguration('DISPLAY_ACTIONS_COLUMN');
$upgrade->updateConfiguration('SUBSCRIBE_BY_CATEGORY', '1');
$upgrade->updateConfiguration('SEND_NEWSLETTER_ON_SUBSCRIBE', '0');
$upgrade->updateConfiguration('FUNC_MAIL_EMAIL', Configuration::get('PS_SHOP_EMAIL'));
// chimp update (no)
// chimp database don't need update because is intalled separatly
$upgrade->createTable('newsletter_pro_config', '
`id_newsletter_pro_config` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL,
`value` TEXT NULL,
PRIMARY KEY (`id_newsletter_pro_config`),
UNIQUE INDEX `name` (`name`)
');
if (!$upgrade->success()) {
return false;
}
if (!$upgrade->valueExists('newsletter_pro_config', 'name', 'CHIMP_SYNC')) {
$upgrade->insertValue('newsletter_pro_config', [
'name' => 'CHIMP_SYNC',
'value' => serialize([]),
]);
}
if (!$upgrade->valueExists('newsletter_pro_config', 'name', 'LAST_DATE_CHIMP_SYNC')) {
$upgrade->insertValue('newsletter_pro_config', [
'name' => 'LAST_DATE_CHIMP_SYNC',
'value' => '0000-00-00 00:00:00',
]);
}
// database update (no)
$upgrade->createTable('newsletter_pro_send', "
`id_newsletter_pro_send` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_newsletter_pro_tpl_history` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`template` VARCHAR(50) NULL DEFAULT NULL,
`active` INT(1) NOT NULL DEFAULT '0',
`emails_count` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`emails_success` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`emails_error` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`emails_completed` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`error_msg` LONGTEXT NULL,
`date` DATE NULL DEFAULT NULL,
PRIMARY KEY (`id_newsletter_pro_send`),
INDEX `id_newsletter_pro_tpl_history` (`id_newsletter_pro_tpl_history`)
");
$upgrade->createTable('newsletter_pro_send_step', "
`id_newsletter_pro_send_step` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_newsletter_pro_send` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`step` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`step_active` INT(1) NOT NULL DEFAULT '0',
`emails_to_send` LONGTEXT NULL,
`emails_sent` LONGTEXT NULL,
`date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id_newsletter_pro_send_step`),
INDEX `id_step` (`step`),
INDEX `id_task` (`id_newsletter_pro_send`)
");
if (!$upgrade->success()) {
return false;
}
$table_newsletter_pro = 'newsletter_pro';
$result = get_newsletter_pro_data_2_1_6($upgrade, $table_newsletter_pro);
if (is_array($result)) {
$group_by_steps = [];
foreach ($result as $row) {
$group_by_steps[$row['id_step']][] = $row;
}
$id_newsletter_pro_send = 0;
foreach ($group_by_steps as $row) {
++$id_newsletter_pro_send;
reset($row);
$first_key = key($row);
end($row);
$last_key = key($row);
$emails_success = $row[$last_key]['count_sent_succ'];
$emails_error = $row[$last_key]['count_sent_err'];
$emails_count = (int) $emails_success + (int) $emails_error;
// this option is not a real option
$emails_completed = $emails_count;
if (Db::getInstance()->insert('newsletter_pro_send', [
'id_newsletter_pro_send' => (int) $id_newsletter_pro_send,
'id_newsletter_pro_tpl_history' => (int) $row[$first_key]['id_newsletter_pro_tpl_history'],
'template' => '',
'active' => 0,
'emails_count' => (int) $emails_count,
'emails_success' => (int) $emails_success,
'emails_error' => (int) $emails_error,
'emails_completed' => (int) $emails_completed,
'error_msg' => 'a:0:{}',
'date' => pSQL($row[$first_key]['date']),
])) {
foreach ($row as $step_row) {
if (!Db::getInstance()->insert('newsletter_pro_send_step', [
'id_newsletter_pro_send' => (int) $id_newsletter_pro_send,
'step' => (int) $step_row['id_step'],
'step_active' => (int) $step_row['active'],
'emails_to_send' => $step_row['emails_to_send'],
'emails_sent' => $step_row['emails_sent'],
'date' => pSQL($step_row['date']),
])) {
$upgrade->addError(sprintf($module->l('Cannot insert the data into the table "%s".'), 'newsletter_pro_send_step'));
}
}
} else {
$upgrade->addError(sprintf($module->l('Cannot insert the data into the table "%s".'), 'id_newsletter_pro_send'));
}
}
} else {
$upgrade->addError(sprintf($module->l('An error occurred on getting the data from the database table "%s".'), $table_newsletter_pro));
}
if (!$upgrade->success()) {
return false;
}
$upgrade->deleteTable('newsletter_pro');
$upgrade->createTable('newsletter_pro_statistics', "
`id_product` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`clicks` INT(10) NOT NULL DEFAULT '0',
UNIQUE INDEX `id_product` (`id_product`)
");
$upgrade->createTable('newsletter_pro_customer_category', "
`id_customer` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`categories` TEXT NULL,
UNIQUE INDEX `id_customer` (`id_customer`)
");
$lang_default = (int) Configuration::get('PS_LANG_DEFAULT');
$shop_default = (int) Configuration::get('PS_SHOP_DEFAULT');
$upgrade->changeColumn('newsletter_pro_email', 'id_shop', "`id_shop` INT(10) UNSIGNED NOT NULL DEFAULT '".$shop_default."'");
$upgrade->changeColumn('newsletter_pro_email', 'id_shop_group', "`id_shop_group` INT(10) UNSIGNED NOT NULL DEFAULT '".$shop_default."'");
$upgrade->changeColumn('newsletter_pro_email', 'id_lang', "`id_lang` INT(10) UNSIGNED NULL DEFAULT '".$lang_default."'");
$upgrade->changeColumn('newsletter_pro_email', 'date_add', '`date_add` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP');
$upgrade->deleteTable('newsletter_pro_image');
$upgrade->addColumn('newsletter_pro_smtp', 'from', '`from` VARCHAR(255) NULL DEFAULT NULL', 'name');
$upgrade->addColumn('newsletter_pro_task', 'pause', "`pause` INT(10) NOT NULL DEFAULT '0'", 'sleep');
$upgrade->changeColumn('newsletter_pro_task', 'error_msg', '`error_msg` LONGTEXT NULL');
$upgrade->changeColumn('newsletter_pro_task_step', 'date', '`date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP');
$upgrade->addColumn('newsletter_pro_tpl_history', 'clicks', "`clicks` INT(1) NOT NULL DEFAULT '0'");
return $upgrade->success();
}
function count_emails_2_1_6($row, $field)
{
$count = 0;
foreach ($row as $value) {
$count += $value[$field];
}
return $count;
}
function get_newsletter_pro_data_2_1_6($upgrade, $table)
{
try {
if ($upgrade->tableExists($table)) {
$result = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.$table.'` WHERE 1');
return $result;
}
return [];
} catch (Exception $e) {
return false;
}
return false;
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_1_7($module)
{
$upgrade = $module->upgrade;
// configuration update (yes)
$upgrade->updateConfiguration('GOOGLE_UNIVERSAL_ANALYTICS_ACTIVE', '0');
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_1_8($module)
{
$upgrade = $module->upgrade;
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_1_9($module)
{
$upgrade = $module->upgrade;
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_2_0($module)
{
$upgrade = $module->upgrade;
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_2_1($module)
{
$upgrade = $module->upgrade;
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_2_3($module)
{
$upgrade = $module->upgrade;
// configuration update (no)
// database update (no)
return $upgrade->success();
}

View File

@@ -0,0 +1,43 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_4_0($module)
{
$upgrade = $module->upgrade;
// configuration update (no)
// database update (yes)
$upgrade->changeColumn('newsletter_pro_send', 'date', '`date` DATETIME NULL DEFAULT NULL');
$upgrade->changeColumn('newsletter_pro_task', 'date_start', '`date_start` DATETIME NULL DEFAULT NULL');
$upgrade->addColumn('newsletter_pro_tpl_history', 'token', '`token` VARCHAR(32) NOT NULL', 'id_newsletter_pro_tpl_history');
$upgrade->changeColumn('newsletter_pro_tpl_history', 'clicks', "`clicks` INT(10) NOT NULL DEFAULT '0'");
$upgrade->addColumn('newsletter_pro_tpl_history', 'opened', "`opened` INT(10) NOT NULL DEFAULT '0'", 'clicks');
$upgrade->addColumn('newsletter_pro_tpl_history', 'unsubscribed', "`unsubscribed` INT(10) NOT NULL DEFAULT '0'", 'opened');
$upgrade->createTable('newsletter_pro_unsibscribed', "
`id_newsletter_pro_unsibscribed` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_newsletter_pro_tpl_history` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`email` VARCHAR(255) NOT NULL,
`date_add` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id_newsletter_pro_unsibscribed`)
");
return $upgrade->success();
}

View File

@@ -0,0 +1,44 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_5_0($module)
{
$upgrade = $module->upgrade;
// configuration update (no)
$upgrade->deleteConfiguration('FUNC_MAIL_ACTIVE');
$upgrade->deleteConfiguration('FUNC_MAIL_EMAIL');
$upgrade->updateConfiguration('DEBUG_MODE', '0');
// this option already exists, uncomment the line to override the settings acording of the new version standards
// $upgrade->updateConfiguration('PRODUCT_LINK_REWRITE', (int)Configuration::get('PS_REWRITING_SETTINGS'));
// database update (yes)
$upgrade->addColumn('newsletter_pro_smtp', 'method', "`method` INT(1) NOT NULL DEFAULT '1'", 'id_newsletter_pro_smtp');
if (!$upgrade->columnExists('newsletter_pro_smtp', 'from_name')) {
$upgrade->changeColumn('newsletter_pro_smtp', 'from', '`from_name` VARCHAR(255) NULL DEFAULT NULL');
}
$upgrade->addColumn('newsletter_pro_smtp', 'from_email', '`from_email` VARCHAR(255) NULL DEFAULT NULL', 'from_name');
$upgrade->addColumn('newsletter_pro_smtp', 'reply_to', '`reply_to` VARCHAR(255) NULL DEFAULT NULL', 'from_email');
return $upgrade->success();
}

View File

@@ -0,0 +1,49 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_7_1($module)
{
$upgrade = $module->upgrade;
// configuration update (no)
$upgrade->updateConfiguration('FWD_FEATURE_ACTIVE', '1');
// database update (yes)
$upgrade->addColumn('newsletter_pro_tpl_history', 'fwd_unsubscribed', "`fwd_unsubscribed` INT(10) NOT NULL DEFAULT '0'", 'unsubscribed');
$upgrade->createTable('newsletter_pro_fwd_unsibscribed', "
`id_newsletter_pro_fwd_unsibscribed` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_newsletter_pro_tpl_history` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`email` VARCHAR(255) NOT NULL,
`date_add` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id_newsletter_pro_fwd_unsibscribed`)
");
$upgrade->createTable('newsletter_pro_forward', '
`id_newsletter_pro_forward` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`from` VARCHAR(128) NOT NULL,
`to` VARCHAR(128) NOT NULL,
`date_add` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id_newsletter_pro_forward`),
UNIQUE INDEX `to` (`to`)
');
return $upgrade->success();
}

View File

@@ -0,0 +1,157 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_1_1($module)
{
$upgrade = $module->upgrade;
// hooks (yes)
$upgrade->registerHook('actionShopDataDuplication');
// configuration update (yes)
$upgrade->updateConfiguration('SUBSCRIPTION_SECURE_SUBSCRIBE', '0');
$upgrade->updateConfiguration('SUBSCRIPTION_ACTIVE', '0');
if (!NewsletterProConfigurationShop::install()) {
$upgrade->mergeErrors(NewsletterProConfigurationShop::getErrors());
return false;
}
// database update (yes)
$upgrade->createTable('newsletter_pro_list_of_interest', "
`id_newsletter_pro_list_of_interest` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`active` TINYINT(1) NOT NULL DEFAULT '1',
`position` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_newsletter_pro_list_of_interest`)
");
$upgrade->createTable('newsletter_pro_list_of_interest_lang', '
`id_newsletter_pro_list_of_interest` INT(11) UNSIGNED NOT NULL,
`id_lang` INT(11) UNSIGNED NOT NULL,
`id_shop` INT(11) UNSIGNED NOT NULL,
`name` VARCHAR(255) NULL DEFAULT NULL,
PRIMARY KEY (`id_newsletter_pro_list_of_interest`, `id_lang`, `id_shop`)
');
$upgrade->createTable('newsletter_pro_list_of_interest_shop', "
`id_newsletter_pro_list_of_interest` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`id_shop` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`active` TINYINT(1) NOT NULL DEFAULT '1',
`position` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_newsletter_pro_list_of_interest`, `id_shop`)
");
$upgrade->createTable('newsletter_pro_subscribers', "
`id_newsletter_pro_subscribers` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_shop` INT(10) UNSIGNED NOT NULL DEFAULT '1',
`id_shop_group` INT(10) UNSIGNED NOT NULL DEFAULT '1',
`id_lang` INT(10) UNSIGNED NULL DEFAULT '1',
`id_gender` INT(10) UNSIGNED NOT NULL,
`firstname` VARCHAR(32) NULL DEFAULT NULL,
`lastname` VARCHAR(32) NULL DEFAULT NULL,
`email` VARCHAR(255) NOT NULL,
`birthday` DATE NULL DEFAULT NULL,
`ip_registration_newsletter` VARCHAR(15) NULL DEFAULT NULL,
`list_of_interest` TEXT NULL,
`date_add` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`active` TINYINT(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id_newsletter_pro_subscribers`),
INDEX `id_shop` (`id_shop`),
INDEX `id_lang` (`id_lang`),
INDEX `id_shop_group` (`id_shop_group`),
INDEX `id_gender` (`id_gender`)
");
$upgrade->createTable('newsletter_pro_subscribers_temp', "
`id_newsletter_pro_subscribers_temp` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_newsletter_pro_subscription_tpl` INT(11) NOT NULL DEFAULT '0',
`token` VARCHAR(32) NOT NULL,
`email` VARCHAR(255) NOT NULL,
`data` LONGTEXT NOT NULL,
`date_add` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id_newsletter_pro_subscribers_temp`, `id_newsletter_pro_subscription_tpl`)
");
$upgrade->createTable('newsletter_pro_subscription_tpl', "
`id_newsletter_pro_subscription_tpl` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`voucher` VARCHAR(255) NULL DEFAULT NULL,
`active` TINYINT(1) NOT NULL DEFAULT '0',
`display_gender` TINYINT(1) NOT NULL DEFAULT '0',
`display_firstname` TINYINT(1) NOT NULL DEFAULT '0',
`display_lastname` TINYINT(1) NOT NULL DEFAULT '0',
`display_language` TINYINT(1) NOT NULL DEFAULT '0',
`display_birthday` TINYINT(1) NOT NULL DEFAULT '0',
`display_list_of_interest` TINYINT(1) NOT NULL DEFAULT '0',
`list_of_interest_type` TINYINT(1) NOT NULL DEFAULT '0',
`display_subscribe_message` TINYINT(1) NOT NULL DEFAULT '1',
`body_width` VARCHAR(255) NOT NULL DEFAULT '40%',
`body_min_width` INT(11) NOT NULL DEFAULT '0',
`body_max_width` INT(11) NOT NULL DEFAULT '0',
`body_top` INT(11) NOT NULL DEFAULT '100',
`show_on_pages` VARCHAR(255) NOT NULL DEFAULT '0',
`cookie_lifetime` FLOAT NOT NULL DEFAULT '366',
`start_timer` INT(11) NOT NULL DEFAULT '0',
`when_to_show` INT(11) NOT NULL DEFAULT '0',
`date_add` DATETIME NULL DEFAULT NULL,
`css_style` LONGTEXT NULL,
PRIMARY KEY (`id_newsletter_pro_subscription_tpl`),
UNIQUE INDEX `name` (`name`)
");
$upgrade->createTable('newsletter_pro_subscription_tpl_lang', "
`id_newsletter_pro_subscription_tpl` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_lang` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`id_shop` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`content` LONGTEXT NULL,
`subscribe_message` LONGTEXT NULL,
`email_subscribe_voucher_message` LONGTEXT NULL,
`email_subscribe_confirmation_message` LONGTEXT NULL,
PRIMARY KEY (`id_newsletter_pro_subscription_tpl`, `id_lang`, `id_shop`)
");
$upgrade->createTable('newsletter_pro_subscription_tpl_shop', "
`id_newsletter_pro_subscription_tpl` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`id_shop` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`active` TINYINT(1) NOT NULL DEFAULT '1',
`css_style` LONGTEXT NULL,
`show_on_pages` VARCHAR(255) NOT NULL DEFAULT '0',
`cookie_lifetime` FLOAT NOT NULL DEFAULT '366',
`start_timer` INT(11) NOT NULL DEFAULT '0',
`when_to_show` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_newsletter_pro_subscription_tpl`, `id_shop`)
");
$install = new NewsletterProInstall();
if (!$install->execute()) {
$upgrade->mergeErrors($install->getErrors());
return false;
}
// the install object is required
require_once _NEWSLETTER_PRO_DIR_.'/install/Install-3.1.1.php';
return $upgrade->success();
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_1_2($module)
{
$upgrade = $module->upgrade;
$upgrade->changeColumn('newsletter_pro_subscribers', 'id_gender', "`id_gender` INT(10) UNSIGNED NULL DEFAULT '0'");
// change the menu name back to Newsletter Pro
$upgrade->updateTabName('Newsletter Pro');
return $upgrade->success();
}

View File

@@ -0,0 +1,29 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_2_0($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('CONVERT_CSS_TO_INLINE_STYLE', '1');
return $upgrade->success();
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_2_1($module)
{
$upgrade = $module->upgrade;
return $upgrade->success();
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_2_5($module)
{
$upgrade = $module->upgrade;
return $upgrade->success();
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_2_6($module)
{
$upgrade = $module->upgrade;
return $upgrade->success();
}

View File

@@ -0,0 +1,49 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
use PQNP\Config;
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_2_7($module)
{
$upgrade = $module->upgrade;
$chimp_config = Config::get('CHIMP', []);
if (is_array($chimp_config) && array_key_exists('ORDERS_CHECKBOX', $chimp_config)) {
if (!pqnp_config('CHIMP', array_merge($chimp_config, [
'ORDERS_CHECKBOX' => '1',
]), true)) {
$upgrade->addError(sprintf('Cannot update the configuration with the name "%s".', 'ORDERS_CHECKBOX'));
return false;
}
}
if (!$upgrade->valueExists('newsletter_pro_config', 'name', 'CHIMP_LAST_DATE_SYNC_ORDERS')) {
$upgrade->insertValue('newsletter_pro_config', [
'name' => 'CHIMP_LAST_DATE_SYNC_ORDERS',
'value' => '0000-00-00 00:00:00',
]);
}
return $upgrade->success();
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_2_8($module)
{
$upgrade = $module->upgrade;
$upgrade->createTable('newsletter_pro_email_exclusion', "
`id_newsletter_pro_email_exclusion` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`email` VARCHAR(255) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_newsletter_pro_email_exclusion`),
UNIQUE INDEX `email` (`email`)
");
return $upgrade->success();
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_2_9($module)
{
$upgrade = $module->upgrade;
return $upgrade->success();
}

View File

@@ -0,0 +1,29 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_3_0($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('LEFT_MENU_ACTIVE', '1');
return $upgrade->success();
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_3_1($module)
{
$upgrade = $module->upgrade;
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_3_2($module)
{
$upgrade = $module->upgrade;
$upgrade->deleteConfiguration('RUN_MULTIPLE_TASKS');
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_4_0($module)
{
$upgrade = $module->upgrade;
$upgrade->addColumn('newsletter_pro_task', 'date_modified', '`date_modified` DATETIME NULL DEFAULT NULL', 'date_start');
return $upgrade->success();
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_4_1($module)
{
$upgrade = $module->upgrade;
return $upgrade->success();
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_4_2($module)
{
$upgrade = $module->upgrade;
return $upgrade->success();
}

View File

@@ -0,0 +1,31 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_4_3($module)
{
$upgrade = $module->upgrade;
$upgrade->addColumn('newsletter_pro_subscription_tpl', 'terms_and_conditions_url', '`terms_and_conditions_url` TEXT NULL', 'when_to_show');
$upgrade->addColumn('newsletter_pro_subscription_tpl_shop', 'terms_and_conditions_url', '`terms_and_conditions_url` TEXT NULL', 'when_to_show');
return $upgrade->success();
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_4_4($module)
{
$upgrade = $module->upgrade;
return $upgrade->success();
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_4_5($module)
{
$upgrade = $module->upgrade;
return $upgrade->success();
}

View File

@@ -0,0 +1,31 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_3_5_0($module)
{
$upgrade = $module->upgrade;
$upgrade->addColumn('newsletter_pro_send', 'state', "`state` INT(10) NOT NULL DEFAULT '0'", 'active');
$upgrade->addColumn('newsletter_pro_send_step', 'error_msg', '`error_msg` LONGTEXT NULL', 'emails_sent');
return $upgrade->success();
}

View File

@@ -0,0 +1,79 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_0_0($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('CROSS_TYPE_CLASS', 'np-icon-cross_5');
// the installed SEND_METHOD is 1, for the update is 0. For not changing the previous settings
$upgrade->updateConfiguration('SEND_METHOD', NewsletterPro::SEND_METHOD_DEFAULT);
$upgrade->updateConfiguration('SEND_ANTIFLOOD_ACTIVE', '1');
$upgrade->updateConfiguration('SEND_ANTIFLOOD_EMAILS', '100');
$upgrade->updateConfiguration('SEND_ANTIFLOOD_SLEEP', '10');
$upgrade->updateConfiguration('SEND_THROTTLER_ACTIVE', '0');
$upgrade->updateConfiguration('SEND_THROTTLER_LIMIT', '100');
$upgrade->updateConfiguration('SEND_THROTTLER_TYPE', NewsletterPro::SEND_THROTTLER_TYPE_EMAILS);
$upgrade->updateConfiguration('PAGE_HEADER_TOOLBAR', [
'CSV' => 1,
'MANAGE_IMAGES' => 1,
'SELECT_PRODUCTS' => 1,
'CREATE_TEMPLATE' => 1,
'SEND_NEWSLETTERS' => 1,
'TASK' => 1,
'HISTORY' => 1,
'STATISTICS' => 1,
'CAMPAIGN' => 0,
'SMTP' => 1,
'MAILCHIMP' => 0,
'FORWARD' => 0,
'FRONT_SUBSCRIPTION' => 1,
'SETTINGS' => 0,
'TUTORIALS' => 1,
]);
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->updateConfiguration('SEND_EMBEDED_IMAGES', 0);
$upgrade->createTable('newsletter_pro_send_connection', "
`id_newsletter_pro_send_connection` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_newsletter_pro_smtp` INT(10) UNSIGNED NOT NULL,
`state` INT(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_newsletter_pro_send_connection`, `id_newsletter_pro_smtp`)
");
$upgrade->createTable('newsletter_pro_filters_selection', '
`id_newsletter_pro_filters_selection` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`value` TEXT NULL,
PRIMARY KEY (`id_newsletter_pro_filters_selection`),
UNIQUE INDEX `name` (`name`)
');
$upgrade->addColumn('newsletter_pro_send_step', 'id_newsletter_pro_send_connection', "`id_newsletter_pro_send_connection` INT(11) UNSIGNED NOT NULL DEFAULT '0'", 'id_newsletter_pro_send');
return $upgrade->success();
}

View File

@@ -0,0 +1,134 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_0_1($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->updateConfiguration('SHOW_CUSTOM_COLUMNS', []);
$upgrade->addColumn('newsletter_pro_send_step', 'date_modified', '`date_modified` TIMESTAMP NULL DEFAULT NULL', 'date');
$upgrade->addColumn('newsletter_pro_send_connection', 'script_uid', '`script_uid` VARCHAR(50) NULL DEFAULT NULL', 'state');
$upgrade->addColumn('newsletter_pro_tpl_history', 'template_name', '`template_name` VARCHAR(255) NOT NULL', 'token');
$upgrade->createTable('newsletter_pro_attachment', '
`id_newsletter_pro_attachment` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`template_name` VARCHAR(255) NOT NULL,
`files` LONGTEXT NOT NULL,
PRIMARY KEY (`id_newsletter_pro_attachment`),
UNIQUE INDEX `template_name` (`template_name`)
');
$upgrade->createTable('newsletter_pro_subscribers_custom_field', "
`id_newsletter_pro_subscribers_custom_field` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`variable_name` VARCHAR(50) NOT NULL,
`type` INT(10) NOT NULL,
`required` INT(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id_newsletter_pro_subscribers_custom_field`),
UNIQUE INDEX `variable_name` (`variable_name`)
");
$upgrade->createTable('newsletter_pro_subscribers_custom_field_lang', "
`id_newsletter_pro_subscribers_custom_field` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_lang` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`value` LONGTEXT NOT NULL,
PRIMARY KEY (`id_newsletter_pro_subscribers_custom_field`, `id_lang`)
");
$upgrade->deleteColumn('newsletter_pro_tpl_history', 'template');
$upgrade->createTable('newsletter_pro_tpl_history_lang', '
`id_newsletter_pro_tpl_history` INT(10) UNSIGNED NOT NULL,
`id_lang` INT(10) UNSIGNED NOT NULL,
`template` LONGTEXT NULL,
PRIMARY KEY (`id_newsletter_pro_tpl_history`, `id_lang`)
');
$upgrade->createTable('newsletter_pro_mailchimp_token', "
`id_newsletter_pro_mailchimp_token` int(10) unsigned NOT NULL AUTO_INCREMENT,
`token` varchar(50) NOT NULL,
`creation_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`expiration_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id_newsletter_pro_mailchimp_token`),
UNIQUE KEY `token` (`token`)
");
try {
$languages = Language::getLanguages(false);
$languages_iso = [];
foreach ($languages as $lang) {
$languages_iso[] = $lang['iso_code'];
}
if (!in_array('en', $languages_iso)) {
$languages_iso[] = 'en';
}
$newsletter_dir = $module->tpl_location.'newsletter/';
$np_index = $newsletter_dir.'index.php';
$files = NewsletterProTools::getDirectoryIterator($newsletter_dir, '/\.html$/');
foreach ($files as $file) {
$path = $file->getPathName();
$basename = pathinfo($path, PATHINFO_BASENAME);
$dir_path = pathinfo($path, PATHINFO_DIRNAME).'/';
$file_path = $dir_path.pathinfo($path, PATHINFO_FILENAME).'/';
if (!file_exists($file_path)) {
if (!mkdir($file_path, 0777)) {
throw new Exception(sprintf($module->l('Unable the create the template "%s". Please check the CHMOD permissions.'), $file_path));
}
}
if (file_exists($np_index)) {
@copy($np_index, $file_path.'index.php');
}
foreach ($languages_iso as $iso) {
$lang_path = $file_path.$iso.'/';
if (!file_exists($lang_path)) {
if (!mkdir($lang_path, 0777)) {
throw new Exception(sprintf($module->l('Unable the create the template "%s". Please check the CHMOD permissions.'), $lang_path));
}
}
if (file_exists($np_index)) {
@copy($np_index, $lang_path.'index.php');
}
$tpl_path = $lang_path.$basename;
if (!copy($path, $tpl_path)) {
throw new Exception(sprintf($module->l('Unable the create the template "%s". Please check the CHMOD permissions.'), $tpl_path));
}
}
@unlink($path);
}
} catch (Exception $e) {
$upgrade->addError($e->getMessage());
}
return $upgrade->success();
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_0_2($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->updateConfiguration('CHIMP_SYNC_UNSUBSCRIBED', 1);
$upgrade->addColumn('newsletter_pro_email', 'filter_name', '`filter_name` VARCHAR(255) NULL DEFAULT NULL', 'ip_registration_newsletter');
return $upgrade->success();
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_3_0($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->addColumn('newsletter_pro_subscription_tpl', 'allow_multiple_time_subscription', '`allow_multiple_time_subscription` INT(11) NOT NULL DEFAULT "1"', 'when_to_show');
$upgrade->addColumn('newsletter_pro_subscription_tpl', 'mandatory_fields', '`mandatory_fields` VARCHAR(255) NULL DEFAULT NULL', 'allow_multiple_time_subscription');
return $upgrade->success();
}

View File

@@ -0,0 +1,31 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_3_1($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SEND_LIMIT_END_SCRIPT', 100);
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
return $upgrade->success();
}

View File

@@ -0,0 +1,31 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_3_2($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('LAST_DATE_NEWSLETTER_BLOCK_SYNC', '0000-00-00 00:00:00');
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
return $upgrade->success();
}

View File

@@ -0,0 +1,41 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_4_0($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->updateConfiguration('CUSTOMER_SUBSCRIBE_BY_LOI', 1);
$subscribe_by_category = (int) pqnp_config('SUBSCRIBE_BY_CATEGORY');
$upgrade->updateConfiguration('DISPLYA_MY_ACCOUNT_NP_SETTINGS', $subscribe_by_category);
$upgrade->createTable('newsletter_pro_customer_list_of_interests', '
`id_customer` INT(10) UNSIGNED NOT NULL DEFAULT "0",
`categories` TEXT NULL,
UNIQUE INDEX `id_customer` (`id_customer`)
');
return $upgrade->success();
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_4_2($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
// for the update the value is 0, the installation value is 1
$upgrade->updateConfiguration('USE_CACHE', 0);
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_4_3($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
return $upgrade->success();
}

View File

@@ -0,0 +1,49 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_4_4($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$old_mails_dir = $module->dir_location.'mails/';
$new_mails_dir = $module->dir_location.'mail_templates/';
$temp_mails_dir = $module->dir_location.'mail_templates_temp/';
if (file_exists($old_mails_dir) && is_writable($old_mails_dir) && file_exists($new_mails_dir) && is_writable($new_mails_dir)) {
@NewsletterProTools::recurseCopy($new_mails_dir, $old_mails_dir);
if (@rename($new_mails_dir, $temp_mails_dir)) {
if (@rename($old_mails_dir, $new_mails_dir)) {
// for security
if (false !== strpos(str_replace('\\', '/', $temp_mails_dir), str_replace('\\', '/', '/modules/newsletterpro/mail_templates_temp'))) {
@NewsletterProTools::deleteDirAndFiles($temp_mails_dir);
}
} else {
@rename($temp_mails_dir, $new_mails_dir);
}
}
}
return $upgrade->success();
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_5_0($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->addColumn('newsletter_pro_smtp', 'list_unsubscribe_active', '`list_unsubscribe_active` INT(1) NULL DEFAULT "0"', 'port');
$upgrade->addColumn('newsletter_pro_smtp', 'list_unsubscribe_email', '`list_unsubscribe_email` VARCHAR(255) NOT NULL', 'list_unsubscribe_active');
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_5_1($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
return $upgrade->success();
}

View File

@@ -0,0 +1,31 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_5_3($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->updateConfiguration('DEV_MODE', 1);
return $upgrade->success();
}

View File

@@ -0,0 +1,43 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_5_5($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->createTable('newsletter_pro_subscription_consent', "
`id_newsletter_pro_subscription_consent` int(11) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(32) NOT NULL DEFAULT '',
`subscribed` int(2) NOT NULL DEFAULT 0,
`ip_address` varchar(32) NOT NULL,
`url` text DEFAULT NULL,
`http_referer` text DEFAULT NULL,
`consent_date` datetime DEFAULT NULL,
`date_add` datetime DEFAULT NULL,
`date_upd` datetime DEFAULT NULL,
PRIMARY KEY (`id_newsletter_pro_subscription_consent`)
");
return $upgrade->success();
}

View File

@@ -0,0 +1,68 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_7_0($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->registerHook('backOfficeHeader');
$upgrade->registerHook('actionAdminControllerSetMedia');
$upgrade->registerHook('registerGDPRConsent');
$upgrade->registerHook('actionDeleteGDPRCustomer');
$upgrade->registerHook('actionExportGDPRData');
$upgrade->alter('newsletter_pro_unsibscribed', '
'.$upgrade->addColumnIfNotExists('newsletter_pro_unsibscribed', 'date_upd', 'datetime default null AFTER `date_add`', true).'
CHANGE COLUMN `date_add` `date_add` datetime default null
');
$upgrade->alter('newsletter_pro_fwd_unsibscribed', '
'.$upgrade->addColumnIfNotExists('newsletter_pro_fwd_unsibscribed', 'date_upd', 'datetime default null AFTER `date_add`', true).'
CHANGE COLUMN `date_add` `date_add` datetime default null
');
if (!$upgrade->hasPrimaryKey('newsletter_pro_customer_category')) {
$upgrade->alter('newsletter_pro_customer_category', '
'.$upgrade->addColumnIfNotExists('newsletter_pro_customer_category', 'id_newsletter_pro_customer_category', 'int(10) unsigned NOT null AUTO_INCREMENT FIRST', true).'
'.$upgrade->addColumnIfNotExists('newsletter_pro_customer_category', 'date_add', 'datetime default null AFTER `categories`', true).'
'.$upgrade->addColumnIfNotExists('newsletter_pro_customer_category', 'date_upd', 'datetime default null AFTER `date_add`', true).'
ADD PRIMARY KEY(`id_newsletter_pro_customer_category`)
');
}
if (!$upgrade->hasPrimaryKey('newsletter_pro_customer_list_of_interests')) {
$upgrade->alter('newsletter_pro_customer_list_of_interests', '
'.$upgrade->addColumnIfNotExists('newsletter_pro_customer_list_of_interests', 'id_newsletter_pro_customer_list_of_interests', 'int(10) unsigned NOT null AUTO_INCREMENT FIRST', true).'
'.$upgrade->addColumnIfNotExists('newsletter_pro_customer_list_of_interests', 'date_add', 'datetime default null AFTER `categories`', true).'
'.$upgrade->addColumnIfNotExists('newsletter_pro_customer_list_of_interests', 'date_upd', 'datetime default null AFTER `date_add`', true).'
ADD PRIMARY KEY(`id_newsletter_pro_customer_list_of_interests`)
');
}
$upgrade->updateConfiguration('SUBSCRIPTION_SECURE_SUBSCRIBE', '1');
$upgrade->deleteConfiguration('USE_CACHE');
$upgrade->updateConfiguration('LOAD_MINIFIED', true);
return $upgrade->success();
}

View File

@@ -0,0 +1,53 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_8_0($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->addColumn('newsletter_pro_subscription_tpl', 'render_loader', '`render_loader` int(11) DEFAULT 0', 'terms_and_conditions_url');
$upgrade->addColumn('newsletter_pro_subscription_tpl_lang', 'email_unsubscribe_confirmation_message', '`email_unsubscribe_confirmation_message` longtext default null', 'email_subscribe_confirmation_message');
$upgrade->addColumn('newsletter_pro_subscribers_temp', 'load_file', '`load_file` varchar(255) default null', 'id_newsletter_pro_subscription_tpl');
// create the new template, an update the new field for the old ones
$template_dir = _NEWSLETTER_PRO_DIR_.'/install/tables/subscription_tpl/responsive_new/';
$subscription_tpl = NewsletterProSubscriptionTpl::loadFile($template_dir, true);
if (!$subscription_tpl->isDuplicateName()) {
$results = Db::getInstance()->executeS('
SELECT `id_newsletter_pro_subscription_tpl` FROM `'._DB_PREFIX_.'newsletter_pro_subscription_tpl`
');
foreach ($results as $row) {
$stpl = new NewsletterProSubscriptionTpl((int) $row['id_newsletter_pro_subscription_tpl']);
if (Validate::isLoadedObject($stpl)) {
$stpl->email_unsubscribe_confirmation_message = $subscription_tpl->email_unsubscribe_confirmation_message;
$stpl->update();
}
}
$subscription_tpl->add();
}
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_8_1($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_8_2($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
return $upgrade->success();
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_8_3($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->alter('newsletter_pro_subscription_consent', '
CHANGE COLUMN `ip_address` `ip_address` varchar(128) NOT NULL
');
return $upgrade->success();
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_8_4($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
// fix for the update 4.7.0, it is missing from there
$upgrade->alter('newsletter_pro_unsibscribed', '
'.$upgrade->addColumnIfNotExists('newsletter_pro_unsibscribed', 'date_upd', 'datetime default null AFTER `date_add`', true).'
CHANGE COLUMN `date_add` `date_add` datetime default null
');
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_8_5($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_8_6($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
return $upgrade->success();
}

View File

@@ -0,0 +1,37 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_8_7($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->updateConfiguration('CUSTOMER_ACCOUNT_SUBSCRIBE_BY_LOI', false);
$upgrade->registerHook('displayCustomerIdentityForm');
$upgrade->registerHook('displayCustomerAccountForm');
$upgrade->registerHook('actionCustomerAccountAdd');
$upgrade->registerHook('actionCustomerAccountUpdate');
return $upgrade->success();
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_8_8($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->alter('newsletter_pro_subscription_consent', '
CHANGE COLUMN `email` `email` varchar(64) NOT NULL DEFAULT \'\'
');
return $upgrade->success();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_8_9($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
return $upgrade->success();
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_9_0($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->alter('newsletter_pro_tpl_history_lang', '
MODIFY template longtext CHARACTER SET utf8mb4 DEFAULT NULL
');
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_9_1($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->updateConfiguration('SUBSCRIPTION_TYPE_POPUP', true);
return $upgrade->success();
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_9_2($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->deleteConfiguration('SUBSCRIPTION_TYPE_POPUP');
$upgrade->updateConfiguration('SUBSCRIPTION_HOOK_POPUP_TYPE', array_fill_keys(NewsletterProSubscriptionHook::getHooksUpper(), 0));
return $upgrade->success();
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_9_3($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->updateConfiguration('SUBSCRIPTION_CONTROLLER_ENABLED', false);
$upgrade->updateConfiguration('SUBSCRIPTION_CONTROLLER_TEMPLATE_ID', 0);
return $upgrade->success();
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_9_4($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->alter('newsletter_pro_tpl_history_lang', '
MODIFY template longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL
');
return $upgrade->success();
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_4_9_5($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->updateConfiguration('EMAIL_MIME_TEXT', false);
return $upgrade->success();
}

View File

@@ -0,0 +1,41 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* @param NewsletterPro $module
*
* @return mixed
*/
function upgrade_module_4_9_6($module)
{
$upgrade = $module->upgrade;
$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);
$upgrade->updateConfiguration('TASK_MEMORY_CHECK_ENABLED', true);
$upgrade->updateConfiguration('SUBSCRIPTION_HOOK_POPUP_TYPE', NewsletterProSubscriptionHook::convertToUpper(pqnp_config('SUBSCRIPTION_HOOK_POPUP_TYPE')));
$upgrade->addColumn('newsletter_pro_task', 'started', '`started` int(1) NOT NULL DEFAULT 0', 'send_method');
return $upgrade->success();
}

View File

@@ -0,0 +1,48 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* @param NewsletterPro $module
*
* @return mixed
*/
function upgrade_module_4_9_7($module)
{
$upgrade = $module->upgrade;
$upgrade->showCacheWarning();
$output = [];
$output[] = $module->l(sprintf('It\'s important to clear the prestashop cache and the browser cache because the file "%s" was removed. A new ajax path has been added.', 'scripts/ajax_newsletterpro_front.php'));
$output[] = ' ';
$output[] = $module->l('The CRON Job and API links have been changed. If you added them in your CPanel you must change them with the new ones.');
$output[$module->l('[Tasks CRON URL]')] = NewsletterProApi::getLink('task', [], true, true);
$output[$module->l('[Mailchimp CRON URL]')] = NewsletterProApi::getLink('syncChimp', [], true, true);
$output[$module->l('[Mailchimp Webhook URL]')] = NewsletterProApi::getLink('mailchimp', [], true, true);
$output[$module->l('[Sync Newsletter Block CRON URL]')] = NewsletterProApi::getLink('syncNewsletterBlock', [], true, true);
$output[$module->l('[Bounced email Webhook URL]')] = NewsletterProApi::getLink('bounce', ['bounceAction' => 'unsubscribe', 'email' => 'demo@demo.com'], true, true);
NewsletterProUpgrade::showWarningMessage($output);
return $upgrade->success();
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* @param NewsletterPro $module
*
* @return mixed
*/
function upgrade_module_4_9_8($module)
{
$upgrade = $module->upgrade;
$upgrade->showCacheWarning();
return $upgrade->success();
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* @param NewsletterPro $module
*
* @return mixed
*/
function upgrade_module_4_9_9($module)
{
$upgrade = $module->upgrade;
$upgrade->showCacheWarning();
return $upgrade->success();
}

View File

@@ -0,0 +1,55 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
use PQNP\Upgrade\Upgrade500;
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* @param NewsletterPro $module
*
* @return mixed
*/
function upgrade_module_5_0_0($module)
{
/** @var NewsletterProUpgrade */
$upgrade = $module->upgrade;
// this is created in NewsletterPro::initConfiguration
if (false == (bool) Configuration::get('NEWSLETTER_PRO_CONFIGURATION_CALL')) {
(new Upgrade500())->call();
}
Configuration::deleteByName('NEWSLETTER_PRO_CONFIGURATION_CALL');
$campaign = pqnp_config_get('CAMPAIGN');
if (!is_array($campaign)) {
$campaign = [
'UTM_SOURCE' => 'Newsletter',
'UTM_MEDIUM' => 'email',
'UTM_CAMPAIGN' => '{newsletter_title}',
'UTM_CONTENT' => '{product_name}',
];
$upgrade->updateConfiguration('CAMPAIGN', $campaign);
}
return $upgrade->success();
}

View File

@@ -0,0 +1,70 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
use PQNP\Config;
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* @param NewsletterPro $module
*
* @return mixed
*/
function upgrade_module_5_0_1($module)
{
/** @var NewsletterProUpgrade */
$upgrade = $module->upgrade;
$chimp = pqnp_config_get('CHIMP');
$chimp_data = [
'INSTALLED' => false,
'API_KYE' => '',
'ID_LIST' => '',
'ID_GROUPING' => '',
'CUSTOMERS_GROUP_IDS' => [],
'FIELDS' => [],
'CUSTOMERS_CHECKBOX' => 0,
'VISITORS_CHECKBOX' => 0,
'ADDED_CHECKBOX' => 0,
'ORDERS_CHECKBOX' => 0,
];
if (!is_array($chimp) || (is_array($chimp) && 0 == count($chimp))) {
$upgrade->updateConfiguration('CHIMP', $chimp_data);
} elseif (is_array($chimp)) {
foreach ($chimp_data as $key => $value) {
if (!array_key_exists($key, $chimp)) {
$chimp[$key] = $value;
}
}
$upgrade->updateConfiguration('CHIMP', $chimp);
}
$config = pqnp_config();
if (!array_key_exists('LEFT_MENU_ACTIVE', $config)) {
Config::write('LEFT_MENU_ACTIVE', 1);
}
$upgrade->showCacheWarning();
return $upgrade->success();
}

View File

@@ -0,0 +1,38 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
use PQNP\Config;
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* @param NewsletterPro $module
*
* @return mixed
*/
function upgrade_module_5_0_2($module)
{
/** @var NewsletterProUpgrade */
$upgrade = $module->upgrade;
$upgrade->showCacheWarning();
return $upgrade->success();
}

View File

@@ -0,0 +1,38 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
use PQNP\Config;
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* @param NewsletterPro $module
*
* @return mixed
*/
function upgrade_module_5_0_3($module)
{
/** @var NewsletterProUpgrade */
$upgrade = $module->upgrade;
$upgrade->showCacheWarning();
return $upgrade->success();
}

View File

@@ -0,0 +1,26 @@
<?php
/**
* Since 2013 Ovidiu Cimpean.
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright Since 2013 Ovidiu Cimpean
* @license Do not edit, modify or copy this file
*
* @version Release: 4
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;