1

I'm new in Magento and I'm still learning how to deal with blocks. I am trying to add a form on an existing page (Product view for example). I'm trying to do that by adding a block with my form. But I don't know how to do that. Can anyone help me?

3
  • What kind of block? Magento1 or Magento2
    – nuovecode
    Apr 16 '17 at 22:01
  • I'm using magento 1.9.. It's just a block to show up a file upload button Apr 16 '17 at 22:18
  • did you create the upload button block? Apr 17 '17 at 4:29
2

add below code into local.xml of your theme

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <catalog_product_view>
        <reference name="product.info">
            <block type="core/template" name="custom.block" as="customBlock" template="<PATH TO PHTML FILE>"/>
        </reference>
    </catalog_product_view>
</layout>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.