Incorrect breadcrumb for products in multiple categories

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I am using nopCommerce 1.8. I have noticed that when a product is assigned to multiple categories, the breadcrumbs do not show the correct path to the product. Having a look at other topics in this forum I have seen that nopCommerce uses the first category the product is assigned to.

Is there any possibility to solve this behaviour with nopCommerce 1.8 or with a more recent version?

Thank you.
13 years ago
it's still like that with v1.9
13 years ago
For those who might be interested, this is the solution I have chosen:

These two modules:

\Modules\CategoryNavigation.ascx.cs
\Modules\ProductCategoryBreadcrumb.ascx.cs

take the 'ProductID', find the first category the product is assigned to and that is the category shown in the menu and breadcrumbs.

I save the last 'CategoryID' in a Session variable in those two modules. Instead of taking the first category assigned to a product, I try to find the last saved 'CategoryID' in the list of categories assigned to the product. If I find it I use that category instead of the first one.

It is not perfect, but does the trick in most of the cases.

I hope it helps someone.
13 years ago
Hi r_razquin

Would you please post the code for this solution!

Regards,
EK
11 years ago
Here is how I solved it: var cacheModel = _cacheManager.Get(cacheKey, 0, () => {
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.