Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <type name="MagentoCatalogHelperProductView">
- <plugin name="Vendor_Module_LayoutMods" type="VendorModulePluginLayoutMod" />
- </type>
- <?php
- namespace VendorModulePlugin;
- class LayoutMod
- {
- public function aroundinitProductLayout(
- MagentoCatalogHelperProductView $subject,
- callable $proceed,
- MagentoFrameworkViewResultPage $resultPage,
- $product,
- $params = null
- ) {
- $result = $proceed($resultPage, $product, $params);
- $resultPage->addPageLayoutHandles(['layout' => $product->getData('page_layout')], 'catalog_product_view');
- print_r($resultPage->getLayout()->getUpdate()->getHandles());
- return $result;
- }
- }
Add Comment
Please, Sign In to add comment