Skip to content

Commit

Permalink
Merge forwardport of #12807 to 2.3-develop branch
Browse files Browse the repository at this point in the history
Applied pull request patch https://github.com/magento/magento2/pull/12807.patch (created by @aschrammel) based on commit(s):
  1. 7819312
  • Loading branch information
magento-engcom-team authored Jan 24, 2018
2 parents 6fb29ac + 6e6c7d2 commit be2840d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/code/Magento/Catalog/Helper/Product/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,18 @@ public function initProductLayout(ResultPage $resultPage, $product, $params = nu
// Load default page handles and page configurations
if ($params && $params->getBeforeHandles()) {
foreach ($params->getBeforeHandles() as $handle) {
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], $handle, false);
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
}
}

$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);

$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], null, false);
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);

if ($params && $params->getAfterHandles()) {
foreach ($params->getAfterHandles() as $handle) {
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], $handle, false);
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Review/Controller/Product/ListAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ protected function getProductPage($product)
$resultPage->getConfig()->setPageLayout($product->getPageLayout());
}
$urlSafeSku = rawurlencode($product->getSku());
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], null, false);
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);
$resultPage->addUpdate($product->getCustomLayoutUpdate());
return $resultPage;
}
Expand Down

0 comments on commit be2840d

Please sign in to comment.