Пример #1
0
 public function initContent()
 {
     parent::initContent();
     $egmultishop = new egmultishop();
     $context = Context::getContext();
     $id_url = egmultishop::getUrlId($context->shop->id);
     $page = $egmultishop->getMultishopPage('contacts', null, false);
     $page = $egmultishop->replaceCeoContact($page);
     $add1 = $egmultishop->replaceCeoContact('%addr1');
     $add2 = $egmultishop->replaceCeoContact('%chema');
     $this->context->smarty->assign(array('page' => $page, 'add1' => $add1, 'add2' => $add2));
     $this->setTemplate('contacts.tpl');
 }
Пример #2
0
 public function initContent()
 {
     parent::initContent();
     $egmultishop = new egmultishop();
     $context = Context::getContext();
     $id_url = egmultishop::getUrlId($context->shop->id);
     //$page = $egmultishop->getMultishopPage('deliverycondition',$id_url);
     $sub_domain = egmultishop::getSubdomain();
     $page = $egmultishop->getMultishopPageDomain('deliverycondition', $sub_domain, false);
     if ($page == "") {
         $page = $egmultishop->getMultishopPage('deliverycondition_df', null, false);
     }
     $page = $egmultishop->replaceCeoContact($page);
     $this->context->smarty->assign(array('page' => $page));
     $this->setTemplate('delivery.tpl');
 }
Пример #3
0
 public function getRegionURL($region)
 {
     $url = egmultishop::getCityURL($region);
     if (!$url) {
         return false;
     }
     return $url;
 }
Пример #4
0
 public function callBack()
 {
     $phone = Tools::getValue('phone', '-');
     $message = Tools::getValue('message', '-');
     $this->newMessage("CallBack", $phone, "", $message, "smscallme_notify");
     // если города основные
     if (egmultishop::isMarketingSite()) {
         // посылаем смс мпаибо за заказ
         $host = Tools::getHttpHost();
         $sms_message = Configuration::get('EGCALLME_MESS_01');
         //"Обращение принято! Ожидайте звонка. Узнайте о предложениях %host/alcii";
         $sms_message = Meta::sprintf2($sms_message, array('host' => $host, 'type' => $type, 'phone' => $phone, 'cname' => $cname, 'message' => $message));
         $this->sendSMS($sms_message, $phone, 2);
     }
 }
Пример #5
0
 public function initContent()
 {
     parent::initContent();
     $egmultishop = new egmultishop();
     $context = Context::getContext();
     $id_url = egmultishop::getUrlId($context->shop->id);
     //$page = $egmultishop->getMultishopPage('shipself',$id_url);
     $sub_domain = egmultishop::getSubdomain();
     $page = $egmultishop->getMultishopPageDomain('shipself', $sub_domain, false);
     if ($page == "") {
         $page = $egmultishop->getMultishopPage('shipself_df', null, false);
         $shipselfPage = $egmultishop->getShipselfCwarNearInfo($id_url);
         $page = $egmultishop->replaceCeoContact($page);
     } else {
         $page = $egmultishop->replaceCeoContact($page);
         $map = $egmultishop->replaceCeoContact('%chema');
     }
     $this->context->smarty->assign(array('page' => $page, 'map' => $map, 'shipselfPage' => $shipselfPage));
     $this->setTemplate('shipself.tpl');
 }
Пример #6
0
 public function hookDisplayTopColumn($params)
 {
     $mshop = new egmultishop();
     $npage = "npage";
     //page for all
     if (egmarketing::isMarketingSite() > 0) {
         $npage = "mpage";
         //page for main cities
     }
     $page = $mshop->getMultishopPage($npage);
     $page = $mshop->replaceCeoWords($page);
     $this->smarty->assign(array('page' => $page));
     return $this->display(__FILE__, 'page.tpl');
 }
Пример #7
0
 public function hookActionValidateOrder($params)
 {
     $order = $params['order'];
     $total = $order->total_paid;
     $host = Tools::getHttpHost();
     $order_id = $order->id;
     $param = array('{total_paid}' => $total, '{shop_url}' => $host);
     Mail::Send((int) $order->id_lang, 'event_order', Mail::l('new order', (int) $order->id_lang), $param, Configuration::get('SMS_ORDER_NEW_EMAIL'), 'Site Admin', null, null, null, null, _PS_MAIL_DIR_, false, (int) $order->id_shop);
     Mail::Send((int) $order->id_lang, 'event_order', Mail::l('new order', (int) $order->id_lang), $param, Configuration::get('PS_SHOP_EMAIL'), 'Site Admin', null, null, null, null, _PS_MAIL_DIR_, false, (int) $order->id_shop);
     // notify to me
     $message = Configuration::get('SMS_ORDER_NEW');
     $address = new Address((int) $order->id_address_delivery);
     $message = Meta::sprintf2($message, array('order' => $order_id, 'host' => $host));
     $phone_client = trim($address->phone) == "" ? $address->phone_mobile : $address->phone;
     $phone_client = preg_replace('#\\D+#', '', $phone_client);
     if (egmultishop::isLiveSite()) {
         //if (Configuration::get('BLOCK_EGMULTSOP_SNON')){
         // send to client if marketing site
         //if(egmultishop::isMarketingSite()>0){
         egmultishop::SendSMS($phone_client, $message);
         //}
         // send to me in any way
         $phone = Configuration::get('SMS_ORDER_NEW_PHONE');
         $message = " " . $total . " RUB ";
         //egmultishop::SendSMS($phone, "new order".$message.$host);
     }
     $param = array('{phone}' => str_replace('+', '', $phone_client), '{message}' => $message, '{fname}' => '', '{type}' => 'NewOrder', '{host}' => $host, '{shost}' => str_replace('.', '-', $host));
     $this->sendTelegramm($param, $sms_message);
     //}
     // client notify
 }