Wednesday, March 13, 2013

Magento Addding the Image Attribute

Adding the Attribute for Product is quite easy but Adding an Attribute for Categroy  is not easy but also not hard ,Just need to follow the magento Structure instead of Running the Query from PHPmyadmin

We can added either text field or an another image Attribute just open header.phtml Or any of the Phtml File and just add the following code which will help to generate the attribute in admin for category and also add in the Database also

Sunday, January 13, 2013

Magento Customize Toolbar for list page

Some times we need to show the toolbar as per our need ,But magento had show same tool bar at the bottom and top of listing page

so in order to change the toolbar we can customize is such a way that top toolbar will be different and bottom toolbar will be different 

Saturday, January 5, 2013

Magento models, resource models, and collections

Every Module of Magento Uses Model,Resource Models and Collections.But some time we get confused between this so let's understand in simple way 
 
A “model” is used to store data, and perhaps performs some business logics against that data.so we create model in every Module to Write some Business Logic

A “resource model” is used to interact with the database on behalf of the “model”. The “resource model” actually performs the CRUD operations.

A “collection model” holds from one to many “models” and knows how to tell the “resource model” to get rows in the basis of information it is given.

There’s a basic ActiveRecord-like one-object-one-table Model, and there’s also an Entity Attribute Value (EAV) Model.

Hope this will Help you!

Magento Stages in life Cycle of Block


Blocks are the main part of the Magento so it has own life cycle .so how it works

1) Blocks are declared in layout XML or instantiated using PHP code
2) After instantiation the _construct() and _prepareLayout() methods are called
3) The controller's renderLayout() method calls toHtml(); all children are rendered
4) _beforeToHtml(), _toHtml() and _afterToHtml

Hope this will help you

LinkWithin

Blog has moved, searching new blog...