VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: Menace on February 19, 2015, 19:56:21 PM

Title: Best practice for products with multiple categories
Post by: Menace on February 19, 2015, 19:56:21 PM
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.
Title: Re: Best practice for products with multiple categories
Post by: jenkinhill on February 19, 2015, 23:49:21 PM
http://forum.virtuemart.net/index.php?topic=79799.0
Title: Re: Best practice for products with multiple categories
Post by: Menace on February 20, 2015, 09:42:07 AM
Sorry I am on VM 3.0.4 with J! 3.3.6
Title: Category in breadcrumbs
Post by: Rsn on December 18, 2018, 12:45:25 PM
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?
Title: Re: Best practice for products with multiple categories
Post by: 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.
Title: Re: Best practice for products with multiple categories
Post by: Rsn on December 18, 2018, 14:07:21 PM
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.
Title: Re: Best practice for products with multiple categories
Post by: AH on December 18, 2018, 18:33:00 PM
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
Title: Re: Best practice for products with multiple categories
Post by: Rsn on December 24, 2018, 05:23:34 AM
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?
Title: Re: Best practice for products with multiple categories
Post by: AH on December 24, 2018, 09:59:08 AM
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