Skip to main content

Canonical urls

More
7 years 2 weeks ago #311412 by Giscard
Canonical urls was created by Giscard
Hello,

I did something wrong on canonical urls.

Some products have "wrong" canonical urls: they dont have the right path, instead of that they are pointing to a wrong path category like "/index.php/hikashop-menu-for-brands-listing/product/product_name" or "/index.php/books/product/product_name" (the product isnt a book). Some other products have the right canonical urls, pointing to the right URL.

I searched in forum and I noticed that I should have disabled the joomla's sef plugin. Also, I had the option "No, generate the URLs" on "Force canonical URLs on listings"

I would like to set the canonical urls in every product, especially in the wrong ones.

Thank you in advance.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311437 by nicolas
Replied by nicolas on topic Canonical urls
Hi,

If you want to have HikaShop fill in the canonical URLs for you you need to:
- clear all the canonical URLs of your products with a mass action: www.hikashop.com/forum/install-update/89...ith-mass-action.html
- set the "force canonical URLs on listings" setting to "Use canonical URL and generate it if missing" in the HikaShop configuration
- browse the listings of the products on the frontend so that the system can generate the new canonical URLs of the products.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311457 by Giscard
Replied by Giscard on topic Canonical urls
Hello,

Everything is fine now.

Thank you very much nicolas.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311491 by Giscard
Replied by Giscard on topic Canonical urls
Hello,

I have the same problem on categories.
They are really messed up.

Can I fix them with Mass actions?

Thank you in advance.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311492 by nicolas
Replied by nicolas on topic Canonical urls
Hi,

Yes. It's the same process:
- clear all the canonical URLs of your categories with a mass action
- set the "force canonical URLs on listings" setting to "Use canonical URL and generate it if missing" in the HikaShop configuration
- browse the listings of the categories on the frontend so that the system can generate the new canonical URLs of the categories.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago - 7 years 1 week ago #311507 by Giscard
Replied by Giscard on topic Canonical urls
Hello,

And how can I reset the category canonical url? I cant find the right field.

Thank you in avance..

Edit: it was early and didnt see the field in the category option. Sorry for bothering you.
Thank you for helping me.
Last edit: 7 years 1 week ago by Giscard.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311525 by Giscard
Replied by Giscard on topic Canonical urls
Hello,

I navigate on the categories in the front end, after I deleted the canonical URL, but they didnt update in back-end.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311528 by nicolas
Replied by nicolas on topic Canonical urls
Hi,

You need to browse them from your main menu item which lists the categories.
If you browse them from the menu module itself, then it just displays the listing of the products of the category selected in the menu item, and thus there is no canonical URL to calculate.
It needs to display a listing of category. to calculate the canonical URL of each category in the listing.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311559 by Giscard
Replied by Giscard on topic Canonical urls
Hello,

I navigate via the hyper menu, clicked on the first item in the main menu, redirect on the categories listings.
What I did wrong ?

Thank you in advance.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311563 by nicolas
Replied by nicolas on topic Canonical urls
Hi,

I'm not sure what you did.
Here is the explanation with a screenshot:
monosnap.com/file/TYfDW7UHJIayDswe5ofepawESFZoqL

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago - 7 years 1 week ago #311591 by Giscard
Replied by Giscard on topic Canonical urls
Hello,

That is what I did and tried to do it again, but I dont get update on the canonical URL in categories.

Thank you in advance.

Edit 1: On mobile is working and is setting the mobile-menu on each category, but on desktop doesnt update the values.
Edit 2: I am thinking that maybe there is something wrong with my menu. You said above nicolas that I shouldnt navigate through modules, so I chaecked if there is a module in my menu. There wasnt. Then I change the mobile menu with my main menu and tried to navigate via mobile in order to see the results on canonical URL. They didnt update.
Last edit: 7 years 1 week ago by Giscard.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311594 by nicolas
Replied by nicolas on topic Canonical urls
Hi,

Once the canonical URL is filled in the categories, it won't be updated. It will only be set if the field is empty in the categories.
Also, then main category from your main menu items won't be filled since they are only displayed in a listing by via a menu module.
So you'll have to fill them manually.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311636 by Giscard
Replied by Giscard on topic Canonical urls
Hello,

Updated I mean from empty string to the right path. I have cleared the canonical urls via mass actios, before navigate. Also, when I see that a category has a mobile url I delete that as well.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311666 by nicolas
Replied by nicolas on topic Canonical urls
Hi,

I think I know why this doesn't work for you.
You have sub menu items with the categories and in that case, the system directly use the URL of the sub menu item corresponding to the category, which skips the generation of the URL process where the canonical URL is generated if missing.
Change the code:
Code:
return JRoute::_('index.php?option=com_hikashop&Itemid='.$submenu->itemid);
to:
Code:
$url = JRoute::_('index.php?option=com_hikashop&Itemid='.$submenu->itemid); // save the URL as canonical URL if the "force canonical URLs on listings" setting is activated and the canonical URL is not filled in $config = hikashop_config(); $force_canonical = $config->get('force_canonical_urls',1); if(isset($cid->category_canonical) && empty($cid->category_canonical) && $force_canonical == 2) { $newObj = new stdClass(); $newObj->category_id = $cid->category_id; $newObj->category_canonical = $url; $categoryClass = hikashop_get('class.category'); $categoryClass->save($newObj); } return $url;
in the file components/com_hikashop/views/category/view.html.php and that should help.
Let us know how it goes so that we can add that patch on our end too.
The following user(s) said Thank You: Giscard

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311667 by Giscard
Replied by Giscard on topic Canonical urls
Hello,

Now it generates the path.
But in my case it is not the right one.
I go that: /index.php/hikashop-menu-for-module-131/category/analosima-grafeiou
When I want the path from the menu.

Thank you in advance.

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311671 by nicolas
Replied by nicolas on topic Canonical urls
Hi,

I don't see how that could be the case since this code saves the URL from the sub menu item.
Could you please double check ?

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #311700 by Giscard
Replied by Giscard on topic Canonical urls
Hello,

I am sorry, I double check and everythig is fine now.
The path is the right one.

Thank you very much nicolas!
The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago - 7 years 1 week ago #311743 by Giscard
Replied by Giscard on topic Canonical urls
Hello,

How can I manage a product's Canonical URL, which product will be set in two different categories? I added one product in a different category and it points in the path that is set in the product, of course.

Thank you in advance.
Last edit: 7 years 1 week ago by Giscard.

Please Log in or Create an account to join the conversation.

More
7 years 6 days ago #311763 by nicolas
Replied by nicolas on topic Canonical urls
Hi,

Canonical URLs do not change anything regarding that.
It's only if you activate the "force canonical URLs on listings" setting of the HikaShop configuration that the canonical URL of the product will be used everywhere.
If you don't want that, you should turn off that setting. That way, the URLs to access the product page will be different, but the indexed URL for search engines will still be the canonical URL (and you won't have issues with SEO).

Please Log in or Create an account to join the conversation.

More
7 years 6 days ago #311781 by Giscard
Replied by Giscard on topic Canonical urls
Hello,

I tried to turn off the option about canonical URLs, but the current products display error in the fron-end so I turn it up again.

Please Log in or Create an account to join the conversation.

Time to create page: 0.296 seconds
Powered by Kunena Forum