News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Canonical link of a category with manufacturer sort

Started by alxgan, August 23, 2024, 16:40:10 PM

Previous topic - Next topic

alxgan

Hello,

I've lost 2 nights around this one.
In short:
Having a /manufacturer/manuf_name in url doubles the TopCategory in canonical link and gets in google index.

In long:
On website there is a Joomla menu with only TopCategories (virtuemart category).
If I browse to domain.com/TopCat1/SubCat1.../SubCatN every canonical is correct.
Now, for example, I open TopCat1/SubCat1/SubCat2.html and the following code will generate the correct link to category with manufacture sort applied:
Route::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$this->category->virtuemart_category_id.'&virtuemart_manufacturer_id='.$this->virtuemart_manufacturer_id.'&clearCart=0&limitstart=0',FALSE);will output link:
domain.com/TopCat1/manufacturer/manuf_name/SubCat1/Subcat2.html

Now when I browse the link, the url is correct, the filter is applied to products but the canonical url is:
url:           domain.com/TopCat1/manufacturer/manuf_name/SubCat1/Subcat2.html
canonical: domain.com/TopCat1/manufacturer/manuf_name/TopCat1/SubCat1/Subcat2.html

Because of this I got hundreds of pages indexed with "good" canonical by google. And also hundreds indexed for:
url:          domain.com/component/virtuemart/manufacturer/manuf_name/TopCat1/SubCat1/Subcat2.html
canonical: domain.com/component/virtuemart/manufacturer/manuf_name/TopCat1/SubCat1/Subcat2.html
I don't know if these are connected or is another problem to solve.

So please can you shine some light?

Tested on:
Joomla! is 5.1.1 + Virtuemart 4.2.16
Joomla! is 5.1.3 + Virtuemart 4.2.18