News:

Looking for documentation? Take a look on our wiki

Main Menu

Best practice for products with multiple categories

Started by Menace, February 19, 2015, 19:56:21 PM

Previous topic - Next topic

Menace

Hi,

I don't know if there is a way to achieve what I am looking for but probably I'm just not using the VM and Joomla resources correctly so sorry if my question seems stupid.
I hope I can explain my problem well enough.

I'm building a clothes shop and like in many other shops some products have to be in multiple categories. No problem so far. Now on frontend things get confusing to the user. My top navigation highlights the currently viewed category. Because the canonical url (I think) is built with the lowest category ID for each product a product with 2 categories changes several things if user is browsing in the category with the higher ID:

1. Breadcrumbs path is totally different from path that was actually taken by the user
2. Highlighted navigation link changes
3. 'Back to category' button shows the category the user comes from correctly, while product link and navigation show another active category

I understand that this all comes from the canonical url and this is something one wouldn't want to miss but there must be some best practice to work around that I am sure.
Any hints on how to structure the shop categories to avoid these issues?

Thank you!

Edit:
I just noticed it is even worse. The urls of products with multiple categories are changing randomly.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Menace


Rsn

Dear developers!
Now we can choose the canonical category for the product.
Maybe now you can improve the output of the breadcrumbs?
That there was shown not the last category, but canonical?

balai

I have seen a setting in VM 3.4.3 (not sure if exists in previous versions).
There is a field under the categories in the product page.

Rsn

Quote from: balai on December 18, 2018, 13:14:21 PM
I have seen a setting in VM 3.4.3 (not sure if exists in previous versions).
There is a field under the categories in the product page.

Yes, but this setting does not affect the display of breadcrumbs. I would like it to affect the category in breadcrumbs on product page.

AH

I disagree with you request

When viewing a product from a category - the breadcrumb should show the category from which the user viewed the item - NOT the canonical category

Do not change the category from which the product was viewed - that is poor from a user experience
Regards
A

Joomla 3.10.11
php 8.0

Rsn

It probably depends on the situation. And from a combination of site settings.
But in my case it is necessary that breadcrumbs show the canonical category.
Maybe it should be done optionally?

AH

I doubt that will happen for Free in the core there are other more called for developments that will be looked at in the first instance
Regards
A

Joomla 3.10.11
php 8.0