Magento- How can i add a new custom block in product details page using module

后端 未结 2 595
庸人自扰
庸人自扰 2021-01-24 00:09

I am doing a magento customaization site, I need to add the products addtional attributes like it\'s type,version etc .I am new to magento , How can i add the new custom block

2条回答
  •  梦毁少年i
    2021-01-24 00:43

    There's no need to add the block in code, it should be done using config XML files.

    Create an XML config for your module (plenty of tutorials on this).

    check catalog.xml (app/design/frontend/base/default/layout/)

    
     ....
    
    

    This is where the blocks are setup for display on the product view page. You can modify this using your own modules XML file, something like this:

    
        
            
        
    
    

    this will show your custom block on the product view page, inside the content area.

    You also have an error with the naming of your block if it's called Compatible.php the class should be SmartGrowth_CompatibleWith_Block_Compatible

提交回复
热议问题