Author Topic: Best practice for products with multiple categories  (Read 1457 times)

Menace

  • Jr. Member
  • **
  • Posts: 53
Best practice for products with multiple categories
« 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.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27427
  • Always on vacation
    • Jenkin Hill Internet
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.4.3.10057 on Joomla 3.9.8 PHP 7.0.33
Testing VM .3.6.0.10075 on Joomla 3.9.8

Menace

  • Jr. Member
  • **
  • Posts: 53
Re: Best practice for products with multiple categories
« Reply #2 on: February 20, 2015, 09:42:07 am »
Sorry I am on VM 3.0.4 with J! 3.3.6

Rsn

  • Beginner
  • *
  • Posts: 25
  • A beginner
    • Legal company LEGION
Category in breadcrumbs
« Reply #3 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?

balai

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1368
Re: Best practice for products with multiple categories
« Reply #4 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.

Rsn

  • Beginner
  • *
  • Posts: 25
  • A beginner
    • Legal company LEGION
Re: Best practice for products with multiple categories
« Reply #5 on: December 18, 2018, 14:07: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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2898
  • VirtueMart Version: 3.4
Re: Best practice for products with multiple categories
« Reply #6 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
regards
A

Joomla 3.9.1
php 7.1

Rsn

  • Beginner
  • *
  • Posts: 25
  • A beginner
    • Legal company LEGION
Re: Best practice for products with multiple categories
« Reply #7 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?

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2898
  • VirtueMart Version: 3.4
Re: Best practice for products with multiple categories
« Reply #8 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
regards
A

Joomla 3.9.1
php 7.1