I am new to Magento and would like to add a custom block underneath the 'Add to Cart' button.
Here is my catalog_product_view.xml file:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="product.info.form.content">
<block
class="Vendor\ProductPage\Block\Product"
name="product.info.customblock"
after="product.info.addtocart"
template="Vendor_ProductPage::catalog/product/view/custom_block.phtml">
</block>
</referenceContainer>
</body>
</page>
I have tried clearing my cache, re-compiling Magento, different file names and locations for my template file.
My template file is found in
Vendor/ProductPage/view/frontend/templates/catalog/product/view/custom_block.phtml
My layout file is found in
Vendor/ProductPage/view/frontend/layout/catalog_product_view.xml
Any suggestions would be great!
Many thanks Pete