Category Mappings help!!! Bug?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hi!

I am going to sell some products that they are same for some categories.

For example:

- I have an 'X' product.
- I have 'A' category and 'B' category and I want to set the 'X' product to these two categories.

I set on product 'category mappings' section that I want to show my 'X' product on these two categories.

Now, the problem is that when I click on one of these categories, instead of going to this category product, the store goes to the category that have the lower display order on category mappings.

Example:

- X product mapped to A category with display order 1
- X product mapped to B category with display order 2

- I click on X product on A category, I go on breadcrumb to: Home/A/X
- I click on X product on B category, I go on breadcrumb to: Home/A/X instead of Home/B/X

What can I do to fix this?

Thanks!
11 years ago
sabueXo wrote:
Hi!

I am going to sell some products that they are same for some categories.

For example:

- I have an 'X' product.
- I have 'A' category and 'B' category and I want to set the 'X' product to these two categories.

I set on product 'category mappings' section that I want to show my 'X' product on these two categories.

Now, the problem is that when I click on one of these categories, instead of going to this category product, the store goes to the category that have the lower display order on category mappings.

Example:

- X product mapped to A category with display order 1
- X product mapped to B category with display order 2

- I click on X product on A category, I go on breadcrumb to: Home/A/X
- I click on X product on B category, I go on breadcrumb to: Home/A/X instead of Home/B/X

What can I do to fix this?

Thanks!

It is a bug and was reported today vote for the workitem
11 years ago
Ouch... this feature is really important for me...

Thanks for explaining that it's a bug.
11 years ago
I think that this is the problem for breadcumb:

- Web\Presentation\Nop.Web\Controllers\CatalogController.cs
- public ActionResult ProductBreadcrumb(int productId)

if (productCategories.Count > 0)
                        {
                            var category = productCategories[0].Category;
                            if (category != null)
                            {
                                foreach (var catBr in GetCategoryBreadCrumb(category))
                                {
                                    model.CategoryBreadcrumb.Add(new CategoryModel()
                                    {
                                        Id = catBr.Id,
                                        Name = catBr.GetLocalized(x => x.Name),
                                        SeName = catBr.GetSeName()
                                    });
                                }
                            }
                        }

Always is getting the 0 position.

This bug is on left category menu too. I am going to try to find where is the problem.
11 years ago
And here is the problem for left category menu (always get first position):

- Web\Presentation\Nop.Web\Controllers\CatalogController.cs

public ActionResult CategoryNavigation(int currentCategoryId, int currentProductId)
        {
            string cacheKey = string.Format(ModelCacheEventConsumer.CATEGORY_NAVIGATION_MODEL_KEY, currentCategoryId, currentProductId, _workContext.WorkingLanguage.Id);
            var cacheModel = _cacheManager.Get(cacheKey, () =>
            {
                var currentCategory = _categoryService.GetCategoryById(currentCategoryId);
                if (currentCategory == null && currentProductId > 0)
                {
                    var productCategories = _categoryService.GetProductCategoriesByProductId(currentProductId);
                   if (productCategories.Count > 0)
                        currentCategory = productCategories[0].Category;

                }
                var breadCrumb = currentCategory != null ? GetCategoryBreadCrumb(currentCategory) : new List<Category>();
                var model = GetChildCategoryNavigationModel(breadCrumb, 0, currentCategory, 0);
                return model;
            });

            return PartialView(cacheModel);
        }
11 years ago
eadameg wrote:
Hi!

I am going to sell some products that they are same for some categories.

For example:

- I have an 'X' product.
- I have 'A' category and 'B' category and I want to set the 'X' product to these two categories.

I set on product 'category mappings' section that I want to show my 'X' product on these two categories.

Now, the problem is that when I click on one of these categories, instead of going to this category product, the store goes to the category that have the lower display order on category mappings.

Example:

- X product mapped to A category with display order 1
- X product mapped to B category with display order 2

- I click on X product on A category, I go on breadcrumb to: Home/A/X
- I click on X product on B category, I go on breadcrumb to: Home/A/X instead of Home/B/X

What can I do to fix this?

Thanks!
It is a bug and was reported today vote for the workitem


I see that this issue is set as Low impact. I would set as high or at least as medium impact, this is a great feature that can not be used.
11 years ago
sabueXo wrote:
Hi!
I see that this issue is set as Low impact. I would set as high or at least as medium impact, this is a great feature that can not be used.

They never set impact so all workitems have it as Low ;=)
11 years ago
eadameg wrote:
Hi!
I see that this issue is set as Low impact. I would set as high or at least as medium impact, this is a great feature that can not be used.
They never set impact so all workitems have it as Low ;=)


Ok! I understand, thanks!
11 years ago
The only way to fix it is to store customer browsing history in order to know the last visited category. It could dramatically increase database size. It's not a critical issue and as I know 99% of systems work this way.

Furthermore, the fix can effect search engine results. For one search engines will return one category breadcrumb, for others we could return another breadcrumb (distinct page content).
11 years ago
a.m. wrote:
The only way to fix it is to store customer browsing history in order to know the last visited category. It could dramatically increase database size. It's not a critical issue and as I know 99% of systems work this way.

Furthermore, the fix can effect search engine results. For one search engines will return one category breadcrumb, for others we could return another breadcrumb (distinct page content).


I agree with you. To me this is a good feature but with a potential SEO issue, and I agree with you when you say 99% of systems work this way. I certainly not see it as a Bug.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.