I need to change some layouts on the product detail page.
So I tried to locate some blocks in the layout files.
Using the template path hints fo example I know about a block with the template catalog/product/view/customize.phtml
But searching the project with PHP Storm for the term customize.phtml just returns cache files.
For example in the cache there's this line:
<block class="Magento\Catalog\Block\Product\View" name="customize.button" as="customize_button" template="Magento_Bundle::catalog/product/view/customize.phtml" after="product.info.price"/>
But i thought there had to be be a layout xml adding this block somewhere.
Just not able to find it using the PHP Storm Search.
Where is this being added to the layout?
2 Answers 2
It seems you will find the entry here:
vendor/magento/module-bundle/view/frontend/layout/catalog_product_view_type_bundle.xml
<referenceContainer name="product.info.main">
<block class="Magento\Catalog\Block\Product\View" name="customize.button" as="customize_button" template="Magento_Bundle::catalog/product/view/customize.phtml" after="product.info.price" />
</referenceContainer>
There are 2 xml files where customize.phtml is involved:
vendor/magento/module-wishlist/view/frontend/layout/wishlist_index_configure_type_bundle.xml
vendor/magento/module-bundle/view/frontend/layout/catalog_product_view_type_bundle.xml
maybe the vendor folder is outside your phpstorm project
-
indeed it is, as I just found out just moments before reading thisChaz– Chaz2020年10月22日 12:39:37 +00:00Commented Oct 22, 2020 at 12:39