Skip to content

Commit

Permalink
Merge forwardport of #12786 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/12786.patch (created by @aschrammel) based on commit(s):
  1. 935dd8d
  2. deffe81
  • Loading branch information
magento-engcom-team authored Jan 24, 2018
2 parents 8b4ad90 + 3c6d9be commit 9354bb9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/code/Magento/Widget/Model/Widget/Instance.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ class Instance extends \Magento\Framework\Model\AbstractModel

const PRODUCT_LAYOUT_HANDLE = 'catalog_product_view';

const SINGLE_PRODUCT_LAYOUT_HANLDE = 'catalog_product_view_id_{{ID}}';
/**
* @deprecated see self::SINGLE_PRODUCT_LAYOUT_HANDLE
*/
const SINGLE_PRODUCT_LAYOUT_HANLDE = self::SINGLE_PRODUCT_LAYOUT_HANDLE;

const SINGLE_PRODUCT_LAYOUT_HANDLE = 'catalog_product_view_id_{{ID}}';

const PRODUCT_TYPE_LAYOUT_HANDLE = 'catalog_product_view_type_{{TYPE}}';

Expand Down Expand Up @@ -188,12 +193,12 @@ protected function _construct()
$this->_specificEntitiesLayoutHandles = [
'anchor_categories' => self::SINGLE_CATEGORY_LAYOUT_HANDLE,
'notanchor_categories' => self::SINGLE_CATEGORY_LAYOUT_HANDLE,
'all_products' => self::SINGLE_PRODUCT_LAYOUT_HANLDE,
'all_products' => self::SINGLE_PRODUCT_LAYOUT_HANDLE,
];
foreach (array_keys($this->_productType->getTypes()) as $typeId) {
$layoutHandle = str_replace('{{TYPE}}', $typeId, self::PRODUCT_TYPE_LAYOUT_HANDLE);
$this->_layoutHandles[$typeId . '_products'] = $layoutHandle;
$this->_specificEntitiesLayoutHandles[$typeId . '_products'] = self::SINGLE_PRODUCT_LAYOUT_HANLDE;
$this->_specificEntitiesLayoutHandles[$typeId . '_products'] = self::SINGLE_PRODUCT_LAYOUT_HANDLE;
}
}

Expand Down

0 comments on commit 9354bb9

Please sign in to comment.