Product URL remove category_pathway-

  • Posts: 1058
  • Thank you received: 11
  • Hikashop Business
10 months 1 week ago #358884

-- HikaShop version -- : 5.0.3
-- Joomla version -- : 4.4.1

Hi!

Is it possible to change the products URL?
For example:

from this
men-suits.gr/el/proionta/pantelonia/prod.../category_pathway-12

to this
men-suits.gr/el/product/andriko-pantelon...-100-cotton-050p941/

Basically remove the category, the ID and the category_pathway

Thank you

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

  • Posts: 83007
  • Thank you received: 13398
  • MODERATOR
10 months 1 week ago #358892

Hi,

Yes. You have two ways:
1. Change your homepage menu item to the proionta menu item, and Joomla won't add the alias of the menu item in the URL. Then, toggle the "simplified breadcrumbs" setting of the HikaShop configuration, and HikaShop won't add the category_pathway parameter.
Finally, turn on the "remove categories and products ids from URLs" in the Hikashop configuration and you'll end up with the second URL.

2. Install a SEF extension like 4SEF and you'll be able to have any URL you want for any page.

With the first method, you have to structure your website in a way that matches with the URLs as that's how the Joomla routing system is able to understand which element of the website needs to display which page.
With the second method, 4SEF has a table of correspondance between the pages and the URLs so that it will make the conversion, regardless of the structure of the menu items, etc.

The following user(s) said Thank You: verzevoul

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

  • Posts: 1058
  • Thank you received: 11
  • Hikashop Business
10 months 1 week ago #358937

Hi,

I tried the 1st way, all good except the category from the path.
I made the menu item proionta the homepage but i still see the category in the URL.

Thank you

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

  • Posts: 83007
  • Thank you received: 13398
  • MODERATOR
10 months 1 week ago #358942

Hi,

If that was the case, then the URL men-suits.gr/el should display the same thing as the URL men-suits.gr/el/proionta is currently displaying.
So there must be something you're missing with this.

The following user(s) said Thank You: verzevoul

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

  • Posts: 1058
  • Thank you received: 11
  • Hikashop Business
10 months 1 week ago #358952

Hi,

When you click on men-suits.gr/el/ you see the proionta page but when you click on a product the path includes the category.
men-suits.gr/el/proionta/pantelonia/prod...panteloni-tr-050p901

Attachments:
Last edit: 10 months 1 week ago by verzevoul.

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

  • Posts: 83007
  • Thank you received: 13398
  • MODERATOR
10 months 1 week ago #358956

Hi,

Ok. That was not the case when I looked earlier.
The issue now is probably that you have activated the "force canonical URLs on listings" setting of the HikaShop configuration and that in each product, you have the URL with the "proionta/pantelonia" in it.
So you would have to edit the products to remove that part.

The following user(s) said Thank You: verzevoul

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

  • Posts: 1058
  • Thank you received: 11
  • Hikashop Business
10 months 1 week ago #358971

Hi,

the "force canonical URLs on listings" setting is not activated and the canonical of the products are like this: andriko-panteloni-tr-050p901
basically the same as the alias. Maybe you can take a look?

Thank you

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

  • Posts: 83007
  • Thank you received: 13398
  • MODERATOR
10 months 1 week ago #358977

Hi,

Having just the alias is possible if you empty the "product SEF name" setting of the HikaShop configuration. Otherwise, it has to be product/andriko-panteloni-tr-050p901
Also, I think you need to include the language tag in the canonical URL.
The fact that the canonical URL is not correct might be why the system is using another menu item.
Because it checks that the URL is valid before using it, and if it can't it tries to generate it on the fly so that you don't end up with a 404 error.

The following user(s) said Thank You: verzevoul

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

  • Posts: 1058
  • Thank you received: 11
  • Hikashop Business
10 months 5 days ago #359034

Hi,

I need the "product" in the path so i added the canonical as you said with the language tag but since the "force canonical URLs on listings" setting is off i still don't understand how to make it work.

I will send you details if you could please take a look!

Thank you

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

  • Posts: 83007
  • Thank you received: 13398
  • MODERATOR
10 months 5 days ago #359043

Hi,

Thanks for the access.
Everything looks fine to me.
Could you also provide a FTP access in order to look deeper into it ?

The following user(s) said Thank You: verzevoul

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

  • Posts: 1058
  • Thank you received: 11
  • Hikashop Business
10 months 4 days ago #359060

Ok i sent you FTP!

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

  • Posts: 83007
  • Thank you received: 13398
  • MODERATOR
10 months 4 days ago #359073

Hi,

Thanks.

OK, I know what's going on.
You have menu items directly linked to the main category of the products. Because of that the system auto correct the menu item used for the link so that it uses the menu item corresponding to that category.
Since everything is in Greek (the category names, the menu item names, etc) on your website I had not noticed it this.

You can disable that auto correct by adding an entry with the namekey auto_search_menu_item_based_on_main_category and the value 0 in the hikashop_config table via your PHPMyAdmin.
That way, the URL will be the one from the main menu item when looking at the products on the main menu item.

Note that for the links to the products in the sub menu items linked to the product, if you want it to use the URL from the main menu item, you still need to provide the URL of the product from the main menu item in the "canonical URL" field of the product, and turn on the "force canonical URLs on listings" setting.

The following user(s) said Thank You: verzevoul

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

Time to create page: 0.078 seconds
Powered by Kunena Forum