0

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?

1

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>
1

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

1
  • indeed it is, as I just found out just moments before reading this – Chaz Oct 22 '20 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.