News:

Looking for documentation? Take a look on our wiki

Main Menu

canonical category view manufacturer

Started by GuidoS, January 02, 2014, 16:30:31 PM

Previous topic - Next topic

GuidoS

I always get a canonical url to my virtuemart frontpage when I am on the category view for manufacturers. I think this comes because of the following code in the view.html.php of the category.


$categoryId = JRequest::getInt('virtuemart_category_id', false);
$virtuemart_manufacturer_id = JRequest::getInt('virtuemart_manufacturer_id', false );
if ($categoryId === false and $virtuemart_manufacturer_id === false){

$categoryId = ShopFunctionsF::getLastVisitedCategoryId();
$catType = 'category';
$this->setCanonicalLink($tpl,$document,$categoryId,$catType);
} else if ($categoryId === false and $virtuemart_manufacturer_id){

$catType = 'manufacturer';
$this->setCanonicalLink($tpl,$document,$virtuemart_manufacturer_id,$catType);
} else {
$catType = 'category';
$this->setCanonicalLink($tpl,$document,$categoryId,$catType);
}

if($categoryId!==-1){
$vendorId = 1;
$category = $categoryModel->getCategory($categoryId);
}


$categoryId = JRequest::getInt('virtuemart_category_id', false); is returning '0' en that means that


} else {
$catType = 'category';
$this->setCanonicalLink($tpl,$document,$categoryId,$catType);
}


will be executed and category 0 is not presented. Can some one confirm this?

GuidoS

Isn't it strange to use getInt and try to return a boolean? Nobody else who has the problem that there is a wrong canonical url for a category page of manufacturer products?

konserv