I'm reading the documentation here. My goal is to remove the "Customize and Add to Cart" button, for a bundled product
The path for the layout can be found here /vendor/magento/module-gift-registry/view/frontend/layout/catalog_product_view_type_bundle.xml
. I want to remove the first action
<action method="setGiftRegistryTemplate">
<argument name="blockName" xsi:type="string">customize.button</argument>
<argument name="template" xsi:type="string">Magento_GiftRegistry::product/customize.phtml</argument>
</action>
which meets the criteria in the documentation for overriding a layout file
Examples of customizations that involve overriding layouts:
- Suppressing method invocation.
Note there is no method to cancel the prior invocation in the Block class itself. So I have added this file in my custom theme
/app/design/frontend/vendor/theme-name/Magento_GiftRegistry/layout/override/base/catalog_product_view_type_bundle.xml
, duplicating the stock layout file and omitting the first action (referenced above).
There is no change on the frontend, the button is still there. I found this thread, however the original question was not answered, and I'm looking for an answer to that very question now.
So what am I doing wrong?