Skip to content

Commit c4498aa

Browse files
authored
ENGCOM-3698: Fix for making subcategories appear in breadcrumbs #19781
2 parents e61567a + a423cc1 commit c4498aa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/code/Magento/Catalog/Test/Unit/ViewModel/Product/BreadcrumbsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,21 +152,21 @@ public function productJsonEncodeDataProvider() : array
152152
return [
153153
[
154154
$this->getObjectManager()->getObject(Product::class, ['data' => ['name' => 'Test ™']]),
155-
'{"breadcrumbs":{"categoryUrlSuffix":"."html","userCategoryPathInUrl":0,"product":"Test \u2122"}}',
155+
'{"breadcrumbs":{"categoryUrlSuffix":"."html","useCategoryPathInUrl":0,"product":"Test \u2122"}}',
156156
],
157157
[
158158
$this->getObjectManager()->getObject(Product::class, ['data' => ['name' => 'Test "']]),
159-
'{"breadcrumbs":{"categoryUrlSuffix":"."html","userCategoryPathInUrl":0,"product":"Test ""}}',
159+
'{"breadcrumbs":{"categoryUrlSuffix":"."html","useCategoryPathInUrl":0,"product":"Test ""}}',
160160
],
161161
[
162162
$this->getObjectManager()->getObject(Product::class, ['data' => ['name' => 'Test <b>x</b>']]),
163-
'{"breadcrumbs":{"categoryUrlSuffix":".&quot;html","userCategoryPathInUrl":0,"product":'
163+
'{"breadcrumbs":{"categoryUrlSuffix":".&quot;html","useCategoryPathInUrl":0,"product":'
164164
. '"Test &lt;b&gt;x&lt;\/b&gt;"}}',
165165
],
166166
[
167167
$this->getObjectManager()->getObject(Product::class, ['data' => ['name' => 'Test \'abc\'']]),
168168
'{"breadcrumbs":'
169-
. '{"categoryUrlSuffix":".&quot;html","userCategoryPathInUrl":0,"product":"Test &#039;abc&#039;"}}'
169+
. '{"categoryUrlSuffix":".&quot;html","useCategoryPathInUrl":0,"product":"Test &#039;abc&#039;"}}'
170170
],
171171
];
172172
}

app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function getJsonConfigurationHtmlEscaped() : string
105105
[
106106
'breadcrumbs' => [
107107
'categoryUrlSuffix' => $this->escaper->escapeHtml($this->getCategoryUrlSuffix()),
108-
'userCategoryPathInUrl' => (int)$this->isCategoryUsedInProductUrl(),
108+
'useCategoryPathInUrl' => (int)$this->isCategoryUsedInProductUrl(),
109109
'product' => $this->escaper->escapeHtml($this->getProductName())
110110
]
111111
],

0 commit comments

Comments
 (0)