We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71d36d3 commit 9b18305Copy full SHA for 9b18305
app/code/Magento/CatalogGraphQl/Model/Resolver/Category/DataProvider/Breadcrumbs.php
@@ -50,9 +50,9 @@ public function getData(string $categoryPath): array
50
$breadcrumbsData = [];
51
52
$pathCategoryIds = explode('/', $categoryPath);
53
- $parentCategoryIds = array_slice($pathCategoryIds, -1, 1);
+ $parentCategoryIds = array_slice($pathCategoryIds, 2, -1);
54
55
- if (count($parentCategoryIds) > 0) {
+ if (count($parentCategoryIds)) {
56
$collection = $this->collectionFactory->create();
57
$collection->addAttributeToSelect(['name', 'url_key', 'url_path']);
58
$collection->addAttributeToFilter('entity_id', $parentCategoryIds);
0 commit comments