How to override the generating canonical url

  • Posts: 2
  • Thank you received: 0
5 years 3 months ago #302648

-- HikaShop version -- : 4.0.0 stater
-- Joomla version -- : 3.9.0
-- PHP version -- : 7.1
-- Browser(s) name and version -- : latest chrome

I've got an issue when letting hikashop generate canonical url for my product title
Ex:
- Original: Chuột quang NEWMEN M180 (this is a product title in Vietnamese)
- Wrong: chua??t-quang-newmen-m180-den (this is my current problem)
- Correct: chuot-quang-newmen-m180 (this is what I want)
In hikashop configuration, SEF URL configuration, If i set to Use canonical URL and generate it if missing, the above issue will happen. access to that page will lead to Page not found (hikashop page)
It will took me a lot of time to set canonical url manually for each product. Is there any way to edit or override this generating url process ?

Thank you

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

  • Posts: 81504
  • Thank you received: 13063
  • MODERATOR
5 years 3 months ago #302658

Hi,

You have several ways to go about it:
- You could simply activate the "Unicode Aliases" setting of your Joomla configuration. That way, SEF URLs will be able to have special characters in them and the ộ will be in the URL as the other characters and the links will work.
- You could enter the alias without special characters in each product. If the alias is provided, the system will use the alias instead of the product name when generating the SEF URL.
- The conversion of the product name to an alias without special characters is done with the transliteration system of Joomla which uses your Joomla language transliteration function. So normally, it should be able to convert ộ to o if the transliteration function is properly done. Looking a bit online about it, I found this page which apparently talks about that: www.vietpublic.net/tin-tuc/tu-dong-chuye...au-trong-joomla.html
However, the text is in vietnamese, which I don't speak, so I'm not sure if that will help but it sounds like it explains how to add the transliteration system to vietnamese in your Joomla.

The following user(s) said Thank You: tristan1989

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

  • Posts: 2
  • Thank you received: 0
5 years 3 months ago #302671

nicolas wrote: - You could simply activate the "Unicode Aliases" setting of your Joomla configuration. That way, SEF URLs will be able to have special characters in them and the ộ will be in the URL as the other characters and the links will work.

:woohoo: this is the easiest way to solve my issue. Really basic

nicolas wrote: - The conversion of the product name to an alias without special characters is done with the transliteration system of Joomla which uses your Joomla language transliteration function. So normally, it should be able to convert ộ to o if the transliteration function is properly done. Looking a bit online about it, I found this page which apparently talks about that: www.vietpublic.net/tin-tuc/tu-dong-chuye...au-trong-joomla.html
However, the text is in vietnamese, which I don't speak, so I'm not sure if that will help but it sounds like it explains how to add the transliteration system to vietnamese in your Joomla.

This is a more advanced way for my issue :lol:

Thanks for your solution

Last edit: 5 years 3 months ago by tristan1989.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum