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?
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?
The problem is remaining.
I found the solution: http://forum.virtuemart.net/index.php?topic=127772.msg438292#msg438292
Please, try and say result.