News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

category alias and product alias are same, but it only displays product

Started by welrachid, July 13, 2018, 13:41:09 PM

Previous topic - Next topic

welrachid

Hi guys
VM 3.2.14
J!3.8.10

I have a category alias: klistermaerker and a product alias: klistermaerker
I want them both to work so that when i have this url:
example.com/klistermaerker it shows category
example.com/klistermaerker/klistermaerker it shows products

currently it always shows the product, so this mean that there is no category view.
Thanks
Wel
Best regards,
Wel

Jörgen

Maybe there is no category view. Without a link impossible to say. Would you know based on that information ?

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

welrachid

Hi thanks for response...

Here are the actual links:
https://example.dk/klistermaerker/klistermaerker

https://example.dk/klistermaerker

I want the category to perform just like

https://example.dk/storformat category

Best regards,
Wel

Jörgen

I would check the menu structure, do You have any hidden menu ? This could explain the strange setting. If that does not give any clues, turn off sef and see what You get.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Studio 42

If you want have same alias, then use the product suffix in SEO settings.

welrachid

@Jörgen
Without SEO active i get this on category:
https://example.dk/view/category/virtuemart_category_id/29

and this on product
https://example.dk/view/productdetails/virtuemart_product_id/163/virtuemart_category_id/29


@Studio 42
Currently i dont have any suffix on the products. This is due to that i does look weird in a link to have something not part of the product.
But maybe the solution (if this is a bug in the VM) is to rename the product entirely. This is an issue only in THIS single category.

Thanks for your time.
Best regards,
Wel

Studio 42

It's not a bug, it's how the router work.
First it check last part "klistermaerker", if this is found as product, he know it's a product and not a cateogry.
If this is not found as product alias, then it check if this is found as a category.
If you change the alias of the product klistermaerker to klister-maerker then it should work, because you dont have any name conflit with klistermaerker category
If you want safe alias and no onflit use suffix in the config.
In my test shop i use .html and disabled suffix in Joomla config.
So only product details link have .html and it prevent alias conflict with categories
In my shop i use .htm, this is the old standard and work safe too.

welrachid

@studio42
Thanks for response

I've decided to only change this single products alias to be entire name.
Now it works as expected.

Thanks for you time.
Best regards,
Wel