/home/sharedstore/public_html/prestashop.sharedstore.ma/modules/czcouponpop
Edit: /home/sharedstore/public_html/prestashop.sharedstore.ma/modules/czcouponpop/front-end-ajax.php (2124B)
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
include_once('../../config/config.inc.php');
include_once('../../init.php');
include_once('czcouponpop.php');
$module = new CzCouponPop();
$task = Tools::getValue('task');
if ($task == 'cancelRegisNewsletter')
{
$notshow = (int)Tools::getValue('notshow', 0);
$cookies_time = Tools::getValue('cookies_time', 0);
if ($notshow == '1')
{
Context::getContext()->cookie->__set('cookies_time', $cookies_time);
Context::getContext()->cookie->__set('notshow', $notshow);
}
else
{
Context::getContext()->cookie->__set('notshow', $notshow);
}
die(json_encode('1'));
}
if ($task == 'showPopup')
{
Context::getContext()->cookie->__set('notshow', 0);
Context::getContext()->cookie->__set('cookies_time', 0);
die(json_encode('1'));
}
if ($task == 'regisNewsletter')
{
$result = $module->newsletterRegistrationAjax();
//$notshow = (int)Tools::getValue('notshow', 0);
//Context::getContext()->cookie->__set('notshow', $notshow);
//Context::getContext()->cookie->__set('show_voucher', 1);
die(json_encode($result));
}