I am trying to replace the template for the Add To Cart button, but nothing is happening.
Layout file:
app/code/Plumrocket/Callforprice/view/frontend/layout/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">
<head>
<css src="Plumrocket_Callforprice::css/colorcart.css"/>
</head>
<body>
<referenceBlock name='product.info.addtocart' remove="true">
<action method='setTemplate'>
<argument name='template' xsi:type='string'>Plumrocket_Callforprice::catalog/product/view/addtocart.phtml</argument>
</action>
</referenceBlock>
</body>
</page>
Template file
app/code/Plumrocket/Callforprice/view/frontend/templates/catalog/product/view/addtocart.phtml
contains content from
vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml
I tried to change product.info.addtocart
to product.info.addtocart.additional
, but it still does not work.
If needed, here's a link to the project