Showing results for 
Search instead for 
Did you mean: 

Could you please ?


Could you please ?



Here is what I am looking for:


Add a button/link below ADD TO CART button, it should open a new page where I want to run some custom logic.


I am new to Magento so still struggling with terminology. Could you please guide me here about how can I add a new page and link it to a button/hyperlink?



(Admin: Not sure which forum this should go in, so posting the same question in two forums)


Re: Could you please ?

Hi There,


You need to create catalog_product_view.xml file in your custom module or theme wherever you want. File should be at app/code/Vendor/Module/view/frontend/layout.


<?xml version="1.0"?>
<page xmlns:xsi=""  xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
      <referenceContainer name="">
          <block class="Magento\Framework\View\Element\Template" name="custom_button" template="Vendor_module::product/view/custom-button.phtml" after=""/>

Now create custom-button.phtml at app/code/Vendor/Module/view/frontend/templates/product/view and add your code for will show the button below add to cart button. Let me know if I can help you further.