Permalink
Browse files

Added Canonical to advanced_search_result. Added (int) to products_id…

… in canonical link for product page.
  • Loading branch information...
1 parent cfa53fa commit 1ddb0ae144a7f3a3cd2eee2bda67a53e2f3eb810 @gburton committed Aug 14, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 catalog/includes/modules/header_tags/ht_canonical.php
@@ -33,7 +33,7 @@ function execute() {
switch (basename($PHP_SELF)) {
case 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);
+ $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$HTTP_GET_VARS['products_id'], 'NONSSL', false) . '" />' . "\n", $this->group);
break;
case FILENAME_DEFAULT:
if (isset($cPath) && tep_not_null($cPath)) {
@@ -43,6 +43,9 @@ function execute() {
$oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'], 'NONSSL', false) . '" />' . "\n", $this->group);
}
break;
+ case FILENAME_ADVANCED_SEARCH_RESULT:
+ $oscTemplate->addBlock('<link rel="canonical" href="' . tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'keywords=' . $HTTP_GET_VARS['keywords'], 'NONSSL', false) . '" />' . "\n", $this->group);
+ break;
}
}

0 comments on commit 1ddb0ae

Please sign in to comment.