Esempio n. 1
0
 public function getRegionURL($region)
 {
     $url = egmultishop::getCityURL($region);
     if (!$url) {
         return false;
     }
     return $url;
 }
Esempio n. 2
0
 public function hookDisplayNav($params)
 {
     $xdomain = $this->getMainDomain();
     if ($xdomain == $this->host) {
         if (Tools::getValue('utm_medium') == 'cpr') {
             if ($this->context->cookie->__isset('rurl')) {
                 $url = $this->context->cookie->__get('rurl');
                 $this->context->cookie->__unset('rurl');
                 Tools::redirect("http://" . $url);
             } else {
                 $city_q = 'show';
             }
         }
     }
     $this->context->cookie->__set('rurl', $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
     //
     $url = $this->context->cookie->__get('rurl');
     if ($xdomain == $this->host && Tools::getValue('utm_source') == 'rsy') {
         $url = egmultishop::getCityURL($this->context->cookie->__get('yandex_region'));
         if (!$url) {
             $city_q = 'show';
         } else {
             Tools::redirect("http://" . $url['url'] . $_SERVER['REQUEST_URI']);
         }
     }
     $this->smarty->assign(array('ajaxcontroller' => $this->context->link->getModuleLink($this->name, 'ajax'), 'city' => $city_q));
     return $this->display(__FILE__, 'top.tpl');
 }