Breadcrumbs Do Not Refer Correct Category

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
I am reposting a 7 year issue from the Developnent forum. Can be found here. https://www.nopcommerce.com/en/boards/topic/21352/fixed-breadcrumb-and-left-navigation-for-product-in-multiple-categories

NopC v4.3

Through past releases it has been corrected many times but as of v4.3 the code may or may not work.

The Problem
Say you have Category A (first) and Category B (second) assigned to a product (in specific order).
If you are browsing Category A and click on a product, product details breadcrumb display Category B.

If you add Category C (third) and are browsing Category A or B, product details breadcrumb will display Category C.

The only correct way is if you are browsing Category C, product details bradcrumb will display Category C.

Clicking on products in categories, product details breadcrumb should display correct category. No?
3 years ago
https://github.com/nopSolutions/nopCommerce/issues/4486#issuecomment-609656820
3 years ago
The whole point of breadcrumbs is to lead you back to where you were. If that is not achieved then the feature is pointless. As of now, breadcrumbs are broken and the response is not seen as a problem.

If a product has more than one category, nopC does not properly determine which category to display in the breadcrumbs when viewing product details. Currently, what happens is the last category added to the product is used to show in the breadcrumb. This is not right because it is an arbitrary selection based on whatever category was added last to the product.

I challenge anyone to make a counterpoint that breadcrumbs are working properly.

This is the story of Hansel and Gretel where the birds have eaten the breadcrumbs and they got lost in the woods.
3 years ago
you'll have to modify the source code similar to this:
https://www.nopcommerce.com/en/boards/topic/21352/fixed-breadcrumb-and-left-navigation-for-product-in-multiple-categories/page/4#266212

I don't think 4.3 caches the ProductBreadcrumbModelKey but you can still make use of _webHelper.GetUrlReferrer(), and you'll need to modify the webDOTconfig accordingly:
<add name="Referrer-Policy" value="strict-origin-when-cross-origin" />
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.