public function postProcess()
 {
     if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && Tools::getValue('callback_subject')) {
         $iso = Language::getIsoById(intval($this->context->language->id));
         $template = 'callback';
         $subject = Tools::getValue('callback_subject');
         $templateVars = array('{user_name}' => Tools::getValue('name'), '{user_phone}' => Tools::getValue('phone'));
         $admin_mails = Configuration::get('PS_SHOP_EMAIL');
         //                echo _PS_ROOT_DIR_.'/mails/'.$iso.'/'.$template.'.txt';die();
         if (file_exists(_PS_ROOT_DIR_ . '/mails/' . $iso . '/' . $template . '.txt') and file_exists(_PS_ROOT_DIR_ . '/mails/' . $iso . '/' . $template . '.html')) {
             if (Mail::Send($this->context->language->id, $template, $subject, $templateVars, $admin_mails)) {
                 die(Tools::jsonEncode(1));
             }
         }
         die(Tools::jsonEncode(0));
     }
     if (Tools::getValue('product_to_wish')) {
         $email = Tools::getValue('email');
         $id_product = Tools::getValue('id_product');
         if ($alert = StockALert::getByEmailAndProduct($email, $id_product)) {
             if (!$alert['active']) {
                 $updAlert = new StockAlert($alert['id_stock_alert']);
                 $updAlert->active = 1;
                 $updAlert->update();
             }
         } else {
             StockALert::addAlert($email, $id_product);
         }
         die(Tools::jsonEncode(1));
     }
 }