/** * class constructor */ public function __construct() { $this->name = 'sendinblue'; if (version_compare(_PS_VERSION_, '1.5', '>')) { $this->tab = 'emailing'; } else { $this->tab = 'advertising_marketing'; } $this->author = 'SendinBlue'; $this->version = 1.6; $pathconfig = new Pathfindsendinblue(); $this->path = $pathconfig->pathdisp(); parent::__construct(); $this->page = basename(__FILE__, '.php'); $this->displayName = $this->l('SendinBlue'); $this->description = $this->l('Synchronize your PrestaShop contacts with SendinBlue platform & easily send your marketing and transactional emails and SMS'); $this->confirmUninstall = $this->l('Are you sure you want to remove the SendinBlue module? N.B: we will enable php mail() send function (If you were using SMTP info before using SendinBlue SMTP, please update your configuration for the emails)'); $this->ps_versions_compliancy = array('min' => '1.4.2.5', 'max' => _PS_VERSION_); $this->langCookie = $cookie; // Checking Extension if (_PS_VERSION_ < '1.5') { require _PS_MODULE_DIR_ . $this->name . '/backward_compatibility/backward.php'; } $this->langid = $this->context->language->id; $this->lang_cookie = $this->context->cookie; // Checking Extension if (!extension_loaded('curl') || !ini_get('allow_url_fopen')) { if (!extension_loaded('curl') && !ini_get('allow_url_fopen')) { return $this->_html . $this->l('You must enable cURL extension and allow_url_fopen option on your server if you want to use this module.'); } else { if (!extension_loaded('curl')) { return $this->_html . $this->l('You must enable cURL extension on your server if you want to use this module.'); } else { if (!ini_get('allow_url_fopen')) { return $this->_html . $this->l('You must enable allow_url_fopen option on your server if you want to use this module.'); } } } } //Call the callhookRegister method to send an email to the SendinBlue user //when someone registers. $this->callhookRegister(); }
/** * class constructor */ public function __construct() { $this->name = 'sendinblue'; if (version_compare(_PS_VERSION_, '1.5', '>')) { $this->tab = 'emailing'; } else { $this->tab = 'advertising_marketing'; } $this->author = 'SendinBlue'; $this->version = '2.5.2'; parent::__construct(); $this->page = basename(__FILE__, '.php'); $this->displayName = $this->l('SendinBlue'); $this->description = $this->l('Synchronize your PrestaShop contacts with SendinBlue platform & easily send your marketing and transactional emails and SMS'); $this->confirmUninstall = $this->l('Are you sure you want to remove the SendinBlue module? N.B: we will enable php mail() send function (If you were using SMTP info before using SendinBlue SMTP, please update your configuration for the emails)'); require _PS_MODULE_DIR_ . $this->name . '/backward_compatibility/backward.php'; $this->langid = !empty($this->context->language->id) ? $this->context->language->id : ''; $this->lang_cookie = $this->context->cookie; $id_shop = null; if (version_compare(_PS_VERSION_, '1.5', '>')) { $id_shop_group = Shop::getContextShopGroupID(true); if (Shop::getContext() == Shop::CONTEXT_SHOP) { $id_shop = Shop::getContextShopID(true); } } else { $id_shop_group = null; } $this->id_shop_group = $id_shop_group; $this->id_shop = $id_shop; if (version_compare(_PS_VERSION_, '1.4.5', '<')) { $sendinblue_resources = new SendinblueResources(); if ($sendinblue_resources->checkConditionOlderVersion() === true) { $pathconfig = new Pathfindsendinblue(); $this->local_path = $pathconfig->pathdisp(); //Call the callhookRegister method to send an email to the SendinBlue user //when someone registers. $this->callhookRegister(); } } else { $pathconfig = new Pathfindsendinblue(); $this->local_path = $pathconfig->pathdisp(); //Call the callhookRegister method to send an email to the SendinBlue user //when someone registers. $this->callhookRegister(); } // Checking Extension if (!extension_loaded('curl') || !ini_get('allow_url_fopen')) { if (!extension_loaded('curl') && !ini_get('allow_url_fopen')) { return $this->_html . $this->l('You must enable cURL extension and allow_url_fopen option on your server if you want to use this module.'); } elseif (!extension_loaded('curl')) { return $this->_html . $this->l('You must enable cURL extension on your server if you want to use this module.'); } elseif (!ini_get('allow_url_fopen')) { return $this->_html . $this->l('You must enable allow_url_fopen option on your server if you want to use this module.'); } } if (version_compare(_PS_VERSION_, '1.5', '>')) { $this->cl_version = 'ver_5'; } else { $this->cl_version = 'ver_4'; } $this->checkForUpdates(); }