Author Topic: category alias and product alias are same, but it only displays product  (Read 336 times)

welrachid

  • Jr. Member
  • **
  • Posts: 248
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
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

  • Global Moderator
  • Full Member
  • *
  • Posts: 1720
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
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.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

welrachid

  • Jr. Member
  • **
  • Posts: 248
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
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

  • Global Moderator
  • Full Member
  • *
  • Posts: 1720
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
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.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3389
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
If you want have same alias, then use the product suffix in SEO settings.

welrachid

  • Jr. Member
  • **
  • Posts: 248
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
@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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3389
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
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

  • Jr. Member
  • **
  • Posts: 248
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
@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