Breadcrumbs bug

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Pejka
Posts: 17
Joined: 24 Oct 2016, 11:04

Breadcrumbs bug

Post by Pejka » 29 Nov 2016, 10:07

Hello!
There seems to be a bug with the way breadcrumbs are handled, I'm using Laravel 5.1 but I think it's an unrelated aimeos issue.
If I navigate to a product in a regular fashion, that is first selecting a category, then a product, it works fine. If I then go to a different category, and select a different product, it also works fine. But, if I leave one of the product windows open, and in a new tab select a different category and/or product, refreshing the first page will show the newly selected category breadcrumbs.
Is there any way around this?
Thanks,
Máté

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Breadcrumbs bug

Post by aimeos » 29 Nov 2016, 18:51

It's not a bug but caused by keeping the last list page in the session so the detail and the basket component know where you come from (so you can get back).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Pejka
Posts: 17
Joined: 24 Oct 2016, 11:04

Re: Breadcrumbs bug

Post by Pejka » 30 Nov 2016, 15:03

Actually I left it out, if you open a product's detail page directly, the breadcrumbs area simply displays 'search results'.
So yeah, it is buggy, breadcrumbs should display the full path to the current page regardless of where or how you arrived to the page.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Breadcrumbs bug

Post by aimeos » 01 Dec 2016, 10:27

OK, seems we have a different understanding what breadcrumbs are for. We use it to give the users the chance to get back to the last category (or the categories up to the root) or to their last search result.

You want to always display the categories up to the root of the product, regardless of where the users comes from. This means they can't get back to their last search result. Also, most often products are in several categories. Which one would you choose in this situation?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Pejka
Posts: 17
Joined: 24 Oct 2016, 11:04

Re: Breadcrumbs bug

Post by Pejka » 02 Dec 2016, 10:35

Yes, that's the goal. Multiple categories would be an issue, but in that case I guess you just pick one and move up the parent list up to level 0 (since categories can't have more than one parent as far as I can tell). Or maybe display multiple breadcrumbs, say, up to 3 if there are that many categories. At least in theory, since the current project doesn't require a product to be in more than 1 category.
If you stand by that that is how you actually want breadcrumbs to work, I'll just make my own logic for it. But I don't think I'm gonna be the only one who thinks otherwise, so maybe you should consider adding an option to use the other logic :)

Post Reply