I want to add a button only on those products which are having product size.Button displaying over Color attribute.
My XML file is catalog_product_view.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="product.info.main">
<block class="VENDOR\MODULE\Block\Button" name="myButton" template="VENDOR_MODULE::button.phtml" />
</referenceBlock>
</body>
</page>
Right now it is displaying on all products. Thanks in Advance
catalog_product_view_type_configurable.xml
instead ofcatalog_product_view_type_configurable.xml