canonicalRedirection() защищенный Метод

Excludes "*_rewrite" URLs from being treated as non-canonical
protected canonicalRedirection ( string $canonical_url = '' )
$canonical_url string
Пример #1
0
 public function canonicalRedirection()
 {
     if (Configuration::get('PS_CANONICAL_REDIRECT') && strtoupper($_SERVER['REQUEST_METHOD']) == 'GET' && !Tools::getValue('ajax') && !Tools::getIsset('ps_mobile_site') && !Tools::getIsset('add') && !Tools::getIsset('update') && !Tools::getIsset('delete')) {
         $this->php_self = Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 ? 'order-opc.php' : 'order.php';
         parent::canonicalRedirection();
     }
 }
Пример #2
0
 public function canonicalRedirection($canonicalURL = '')
 {
     if (Validate::isLoadedObject($this->cms) && ($canonicalURL = $this->context->link->getCMSLink($this->cms, $this->cms->link_rewrite, $this->ssl))) {
         parent::canonicalRedirection($canonicalURL);
     } elseif (Validate::isLoadedObject($this->cms_category) && ($canonicalURL = $this->context->link->getCMSCategoryLink($this->cms_category))) {
         parent::canonicalRedirection($canonicalURL);
     }
 }
Пример #3
0
 public function canonicalRedirection($canonical_url = '')
 {
     if (Tools::getValue('live_edit')) {
         return;
     }
     if (Validate::isLoadedObject($this->product)) {
         parent::canonicalRedirection($this->context->link->getProductLink($this->product));
     }
 }
 public function canonicalRedirection($canonicalURL = '')
 {
     if (Tools::getValue('live_edit')) {
         return;
     }
     if (Validate::isLoadedObject($this->manufacturer)) {
         parent::canonicalRedirection($this->context->link->getManufacturerLink($this->manufacturer));
     }
 }
Пример #5
0
 public function canonicalRedirection($canonicalURL = '')
 {
     if (!Validate::isLoadedObject($this->category) || !$this->category->inShop() || !$this->category->isAssociatedToShop()) {
         $this->redirect_after = '404';
         $this->redirect();
     }
     if (!Tools::getValue('noredirect') && Validate::isLoadedObject($this->category)) {
         parent::canonicalRedirection($this->context->link->getCategoryLink($this->category));
     }
 }
 /**
  * Redirects to canonical or "Not Found" URL
  *
  * @param string $canonical_url
  */
 public function canonicalRedirection($canonical_url = '')
 {
     if (Tools::getValue('live_edit')) {
         return;
     }
     if (!Validate::isLoadedObject($this->category) || !$this->category->inShop() || !$this->category->isAssociatedToShop() || in_array($this->category->id, array(Configuration::get('PS_HOME_CATEGORY'), Configuration::get('PS_ROOT_CATEGORY')))) {
         $this->redirect_after = '404';
         $this->redirect();
     }
     if (!Tools::getValue('noredirect') && Validate::isLoadedObject($this->category)) {
         parent::canonicalRedirection($this->context->link->getCategoryLink($this->category));
     }
 }
Пример #7
0
 public function canonicalRedirection($canonicalURL = '')
 {
     if (Tools::getValue('live_edit')) {
         return;
     }
     if (Validate::isLoadedObject($this->supplier)) {
         if (Validate::isLoadedObject($this->category)) {
             parent::canonicalRedirection($this->context->link->getSupplierProductLinkByCategory($this->supplier->id, $this->category->id));
         } else {
             parent::canonicalRedirection($this->context->link->getSupplierLink($this->supplier));
         }
     }
 }
Пример #8
0
 public function canonicalRedirection($canonicalURL = '')
 {
     if (Tools::getValue('live_edit')) {
         return;
     }
     if (Validate::isLoadedObject($this->cms) && ($canonicalURL = $this->context->link->getCMSLink($this->cms))) {
         parent::canonicalRedirection($canonicalURL);
     } else {
         if (Validate::isLoadedObject($this->cms_category) && ($canonicalURL = $this->context->link->getCMSCategoryLink($this->cms_category))) {
             parent::canonicalRedirection($canonicalURL);
         }
     }
 }
Пример #9
0
 public function canonicalRedirection($canonical_url = '')
 {
     if (Validate::isLoadedObject($this->product)) {
         parent::canonicalRedirection($this->context->link->getProductLink($this->product));
     }
 }
Пример #10
0
 protected function canonicalRedirection($canonical_url = '')
 {
     parent::canonicalRedirection();
 }
Пример #11
0
 public function canonicalRedirection($canonicalURL = '')
 {
     if (Validate::isLoadedObject($this->manufacturer)) {
         parent::canonicalRedirection($this->context->link->getManufacturerLink($this->manufacturer));
     }
 }