Skip to content

Commit

Permalink
⏫ 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 committed Jan 24, 2018
1 parent 8e77e2f commit 3c6d9be
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 3c6d9be

Please sign in to comment.