Permalink
Browse files

Add canonical link to manufacturers listing (bug #481)

  • Loading branch information...
1 parent f2e9048 commit 7da957c263742527075c26636112c3fdfb939419 @haraldpdl haraldpdl committed Aug 14, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 catalog/includes/modules/header_tags/ht_canonical.php
@@ -33,8 +33,12 @@ function execute() {
if (basename($PHP_SELF) == FILENAME_PRODUCT_INFO) {
$oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'], 'NONSSL', false) . '" />' . "\n", $this->group);
- } elseif ((basename($PHP_SELF) == FILENAME_DEFAULT) && isset($cPath) && tep_not_null($cPath)) {
- $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath, 'NONSSL', false) . '" />' . "\n", $this->group);
+ } elseif (basename($PHP_SELF) == FILENAME_DEFAULT) {
+ if (isset($cPath) && tep_not_null($cPath)) {
+ $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath, 'NONSSL', false) . '" />' . "\n", $this->group);
+ } elseif (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
+ $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'], 'NONSSL', false) . '" />' . "\n", $this->group);
+ }
}
}

0 comments on commit 7da957c

Please sign in to comment.