URL structure category/product in a multilanguage site and flexibility

  • Posts: 86
  • Thank you received: 5
5 years 3 weeks ago #315937

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.15
-- PHP version -- : 7.3
-- Browser(s) name and version -- : Any

Hi, I haven't find a way to have URLs with this very simple (SEF) structure:

<site>/shop/<category_alias>/<product_alias>
where "shop" is the menu item alias for accessing HikaShop.
I can set a specific Canonical URL for every category with same value of the alias and the same for every product putting the category alias as the first part of the product Canonical URL but it's an inflexible way - if I change the alias of a category I have to change all Canonical URLs of its contained products.
Isn't there an automatic feature of Hikashop that can build dynamically such a path?
(By the way we need next version to be able to setup canonical URLs in different languages without Falang).
Also "Simplified breadcrumbs" is a bit weird for me:
  • when set to YES: the URL of a product does not contain the product category alias, fine
  • when set to NO: the URL of a product has a strange structure
    product/<product_alias>/category_pathway-<id>
    that is not so SEF, why the category after the product and not before and why not using the category alias?
Thanks if you can shed some light on this.
Best regards and thank you,

Giuse

Last edit: 5 years 3 weeks ago by Giuse.

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
5 years 3 weeks ago #315953

Hi,

To get a URL like this:
<site>/shop/<category_alias>/<product_alias>
you need to have:
- a category listing menu item "shop" with its main category being your main category.
- a category listing menu item under that shop menu item for each category of your website with its main category being the corresponding category with the alias of the menu item corresponding to the alias of the category.
- to empty the "product SEF name" setting in the HikaShop configuration
- to turn on the "Remove products and categories id in URLs" setting in the HikaShop configuration
This will generate the URLs as you need and the breadcrumbs will correspond to what you tried to achieve with the "simplified breadcrumb" setting turned off but without that extra category_pathway parameter.
Once you do all that, you can set the "Force canonical URLs on listings" setting of the HikaShop configuration to "Use canonical URL and generate it if missing" and the canonical URLs of the products will be generated for you (note that this won't support several languages so you would have to add that yourself).

The following user(s) said Thank You: Giuse

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

  • Posts: 86
  • Thank you received: 5
5 years 3 weeks ago #315985

Ok, so there's not a dynamic way but I need to create as many menu items as many categories are defined, and Canonical URL are static (not calculated at runtime based on the menu item aliases in a path),maybe a feature in the future.
Thanks, it's clear how to use it.

Giuse

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

Time to create page: 0.038 seconds
Powered by Kunena Forum