Category assigned to menu position - SEF questions

  • Posts: 42
  • Thank you received: 1
10 years 1 month ago #208771

-- url of the page with the problem -- : localhost
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5.12
-- Browser(s) name and version -- : Firefox 37.0.2

Hi,

I have Hikashop category tree as follows:

product category
-cat1
--cat2
---cat3

I have assigned Joomla menu positions to these categories (HikaShop » category), however these positions are equal level each to another (all are top level), so in Joomla menu it looks like:
shop (product category from Hikashop)
cat1
cat2
cat3

In any other component I checked (joomla content, k2, vm...) urls in this case looks like this (no matter if in component or module): example.com/shop, example.com/cat1 or example.com/cat2 etc,
but in Hikashop it looks like this: example.com/cat1 (OK), example.com/cat1/category/cat2 (not ok), example.com/cat1/category/cat3 (not ok) - and it's wired in this case - second level (cat2) is not even in the url, there's only first and last with this annoying "category" which can't be even turned off somehow :(

At the end if product is in category "cat3" url of that product is: example.com/cat1/product/product-alias, shouldn't this be at least: example.com/cat3/product/product-alias ?

The perfect scenario - I want to have each category to be like: example.com/shop, example.com/cat1, example.com/cat2 etc. and for product (in cat3): example.com/cat3/product-alias

How to achieve this? If I have Joomla menu item assigned, shouldn't it take advantage over Hikashop "cat1/category/cat3"?

BTW it would be nice to have on your Hikashop demo page SEF turned ON (I mean in Joomla global config: "Search Engine Friendly URLs" = Yes, "Use URL Rewriting" = Yes). Hikashop users could check if some issues are because of their templates/settings or it is Hikashop default behaviour. Is it possible?

Best regards,
Chris

Last edit: 10 years 1 month ago by Gnsbud.

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

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
10 years 1 month ago #208779

Hi,

If you create menu items of the type "hikashop category", the links of these menu items are handled by Joomla and the category you select for each menu item has no influence on the link generated, SEF on or off. It's actually not the category name which is used but the alias of the menu item which is used in that case.

So I'm wondering if you're not talking about a category listing module, where the links of the modules are generated by HikaShop.
In that case, the link is comprised of three parts:
{menu item alias}/{category sef name}/{category alias}
the {menu item alias} comes from your menu item alias.
the {category sef name} comes from the "category SEF name" option of the HikaShop configuration. It can be emptied if you don't want it.
the {category alias} comes from the alias of your category (or name if you didn't specify any alias).
Having the menu item alias is necessary for the SEF system of Joomla so that it knows the current menu item.
The category sef name is necessary to differentiate category pages and product pages.

If you have menu items with the correct URLs for your categories and that you want these URLs to be used by HikaShop when generating the links, you can enter these links in the "canonical URL" field of the categories. That way, you can really control the URLs you'll have on the categories listings.

The following user(s) said Thank You: Gnsbud

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

  • Posts: 42
  • Thank you received: 1
10 years 1 month ago #208803

Hello Nicolas,

thank you for clarifying the situation, now I understand how does it work. Hikashop is really outstanding component, tons of options, I'm testing it for few days now and still finding something new :cheer:

Best regards,
Chris

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

  • Posts: 42
  • Thank you received: 1
10 years 1 month ago #208804

One more thing I noticed: when "category SEF name" is empty and Joomla menu tree is:
cat1
cat2

meanwhile Hikashop category is:
product category
-cat1
--cat2

then I'm getting 404 error while clicking on "cat2" (while visiting cat1). If Joomla menu tree is the same as in Hika, so:

cat1
-cat2

then url for cat2 (inside cat1) is: example.com/cat1/cat2

could you tell me please, if having example.com/cat2 while visiting cat1 is possible or not?

EDIT:

so I guess to have url example.com/cat2 while in cat1 only way is to setup in Hikashop category canonical url to be the same as joomla menu item alias, I'm doing it right?

Last edit: 10 years 1 month ago by Gnsbud.

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

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
10 years 1 month ago #208830

That's exactly it yes.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum