-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
only showing last category #29
Comments
Same here. |
OK, I've found the fix. The code for loading categories need to looks like this: $productCategories = $this->getCurrentProduct()->getCategoryCollection();
if (count($productCategories) === 0) {
return [];
}
$productCategory = current(iterator_to_array($productCategories));
$categories = $productCategory->getParentCategories();
$excludedCategoriesIds = $this->getExcludedCategoriesIds();
$filteredCategories = array_filter(
$categories,
function ($category) use($excludedCategoriesIds) {
return !in_array($category->getId(), $excludedCategoriesIds);
}
);
return $filteredCategories; If you want, you can use our fork https://github.com/groomershop/module-full-breadcrumbs that has that fixed. Beware, that fork changes a bit the way the breadcrumbs template looks and behaves ; it assumes that you use theme-creativeshop . If you don't, you'll have to tweak the P.S. I think whether it needs to be changed or not might depend on your store setting. Like, there's this setting in magento, that controls whether the product's categories contains all its' categories' ancestors; or just the deepest children? I'm not expert in magento, so I'm not sure, but just leaving this as a side comment. |
…iveshop ; show breadcrumbs for all categories ancestors, not just the final child (fixes EaDesgin#29)
I have 3 level categories but for some reason on only see the last category not the last
The text was updated successfully, but these errors were encountered: