Problem with url in Hikashop Module - Content display for Hikashop

  • Posts: 69
  • Thank you received: 5
  • Hikashop Business
3 weeks 8 hours ago #367095

-- HikaShop version -- : 5.1.6
-- Joomla version -- : 5.3.0
-- PHP version -- : 8.4.6

Hi!

I tried to use the module "Hikashop Module - Content display for Hikashop" for my homepage to display the categories with some imagery. This works only in theory. I can use the module but the links that should pointing to the product categories are wrong.

One example ...

The real url looks like this: "domain.de/wasser" (it's a menu)
But the link in the module looks like this: "domain.de/hikashop-menu-for-module-134/kategorie/wasser.

Is it possible that the url router is not working proberly (I have the rewrite feature activated)?

Cheers
Rusty

Last edit: 3 weeks 8 hours ago by Rusty.

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

  • Posts: 83919
  • Thank you received: 13582
  • MODERATOR
3 weeks 5 hours ago #367097

Hi,

The URL "domain.de/wasser" is like that because the alias of the menu item used for that URL is "wasser".
I suppose that your "wasser" category is selected as the "main category" of the "wasser" menu item.
However, you might have several menu items for that same category. So the module doesn't necessarily know which menu item you want to use for a category.
Also, suppose that you have a menu item "shop", and this displays a listing of categories. And for the "wasser" category, the URL is "domain.de/shop/wasser" where "shop" is the alias of the menu, and "wasser" is the alias of the category. The module can't match the category with the "main category" of the menu item, and it's not evident that the parent category of that category is selected in the "main category" of the menu item.

So, by default, the module will use a generic menu item to generate the URL of the category. That way, the page of the category will display with that generic menu item regardless of how you construct your menu items tree structure.
Now, we've made a mechanism so that you can tell the system which URL you want to use for each category. For that, you want to enter the URL you want in the "canonical URL" of each category. Then, activate the "force canonical URLs on listings" setting of the HikaShop configuration. And now, your module will switch to the canonical URL instead of trying to generate the URL itself and you'll get the URLs you want.

You actually have the same mechanism for products.
And having a canonical URL for your categories and products is not only nice to get consistent URLs for your users, it's also good for the SEO of your website.

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

  • Posts: 69
  • Thank you received: 5
  • Hikashop Business
2 weeks 8 hours ago #367191

nicolas wrote: The URL "domain.de/wasser" is like that because the alias of the menu item used for that URL is "wasser".
I suppose that your "wasser" category is selected as the "main category" of the "wasser" menu item.

Yes, is it wrong workflow?
I created for every product category an equal menu item.
Every product inside its category should automatically be shown with a "logical" url scheme.

The workaround with the category canonical url works. But ... it's a workaround.

nicolas wrote: However, you might have several menu items for that same category.

No. Exact one menu item for one product category.

nicolas wrote: Also, suppose that you have a menu item "shop", and this displays a listing of categories. And for the "wasser" category, the URL is "domain.de/shop/wasser" where "shop" is the alias of the menu, and "wasser" is the alias of the category. The module can't match the category with the "main category" of the menu item, and it's not evident that the parent category of that category is selected in the "main category" of the menu item.

No. I do not use any pseudo shop category or shop menu item.

nicolas wrote: Now, we've made a mechanism so that you can tell the system which URL you want to use for each category. For that, you want to enter the URL you want in the "canonical URL" of each category. Then, activate the "force canonical URLs on listings" setting of the HikaShop configuration. And now, your module will switch to the canonical URL instead of trying to generate the URL itself and you'll get the URLs you want.

As I said above. It works ... as a workaround.

nicolas wrote: You actually have the same mechanism for products. And having a canonical URL for your categories and products is not only nice to get consistent URLs for your users, it's also good for the SEO of your website.

Hm ... this doesn't work. I tested it with one product. But there are two problems:
a) I guess you have to type in the product category (or menu item?) AND the product url (which is ... mostly or "everytime" the same like the alias).
b) Even if I do this, the product page is not accessible. In the category view (or products listing view) I see the following (correct) url: "domain.de/category/product" - but if I click it, nothing happens.

Nethertheless - this is absolutely unuseable for the "main user"!

Is there any way to configure the system to work like Joomla's default url routing system - automatically (without manual changing)?
If I create a category in Joomla und put some articles inside this category and link a menu item to this category, all articles automatically will be shown with the correct url, like " www.domain.de/category/article ". The same system should work for the shop. How to achive this?

Cheers

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

  • Posts: 83919
  • Thank you received: 13582
  • MODERATOR
2 weeks 4 hours ago #367192

Hi,

No. Exact one menu item for one product category.

That might be the case on your website, but it's not necessarily the case on other websites. So HikaShop cannot suppose that it is the case, or it would work properly on some websites.

The workaround with the category canonical url works. But ... it's a workaround.

It's true. But it's a good one. And it will help with SEO if you have canonical URLs.

But there are two problems

You don't want to create the canonical URL yourself. You can just copy / paste the URL you already have on the frontend as a canonical URL and that will work.
In fact, you can automate this process, for categories and products, by setting the "force canonical URLs on listings" setting to "Use canonical URL and generate it if missing" :
www.hikashop.com/support/documentation/5...ig.html#features_sef
That way, you don't have to handle that process yourself.

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

  • Posts: 69
  • Thank you received: 5
  • Hikashop Business
1 week 6 days ago #367197

Hi,

nicolas wrote: You don't want to create the canonical URL yourself. You can just copy / paste the URL you already have on the frontend as a canonical URL and that will work.
In fact, you can automate this process, for categories and products, by setting the "force canonical URLs on listings" setting to "Use canonical URL and generate it if missing" :
www.hikashop.com/support/documentation/5...ig.html#features_sef
That way, you don't have to handle that process yourself.


But in this case I face another problem: If the shop creates the canonical urls for the products we get urls like "domain.de/categoryname/product/productname" - but I do NOT want the additional url level (and name) "product". How to avoid?

It should not be like "domain.de/categoryname/product/productname"
but "domain.de/categoryname/productname"

It is not possible to leave the "SEF product name" (in the settings) empty.

Cheers
Rusty

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

  • Posts: 83919
  • Thank you received: 13582
  • MODERATOR
1 week 6 days ago #367200

Hi,

The "product" part of the URL has nothing to do with using canonical URLs or not.
That's because you have "product" in the "Product SEF name" setting of the HikaShop configuration:
www.hikashop.com/support/documentation/5...ig.html#features_sef
Empty that setting, as you suggested, and this part of the URL won't be added.

Note that "categoryname" is actually not the category name but the alias of the menu item.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum
loading