Magento Widget Development

Developing a Magento widget starts with widget.xml file in your modules etc directory.


    
    Widget Title
    Widget description

    1
    
        
            1
            1
            5
            
            text
        
         
        
            0
            1
            
            
            select
            0
            
                
                    0
                    
                
                
                    1
                    
                
            
        
        
        
            
            86400 by default, if not set. To refresh instantly, Clear the Blocks HTML Output Cache.
            1
            text
        
    
    
    



Now you have to build a block class which extends Mage_Core_Block_Template
implements Mage_Widget_Block_Interface
Then just use method _toHtml() and _beforeToHtml() in that class to get set data in template

And that’s all you need.


Posted

in

by

Tags: