Thursday 21 January 2016

What are blocks in Magento

There are two types of blocks: those that automatically render their children and those that don't. Knowing which type you're using will help you in debugging.

Magento blocks are essentially models that contain logic for your view templates. Mind you - this is not business logic, but it is logic related to the display of the information you're presenting. This is by definition presentational logic. If you're familiar with Zend Framework's Zend_Layout you could draw a comparison between custom view objects and layout helpers.

The template file assigned to a block object can execute code as if it is local to that object. That is, $this corresponds directly to the block class.

Layout actions are a thing that people use.

Two types of blocks

There are two types of blocks at the end of the day - those that render automatically and those that don't. Take notes because this is on the Magento Certification exam!!

Auto-rendered blocks


When defined in a layout, any block of type core/text_list will automatically render all its children. While core/text will automatically render itself it really only should contain text and therefore is not useful for layout purposes (though some clever things can be achieved with them).



Other blocks


Any other block type will need to be rendered manually. Provide the block an alias which can then be passed to getChildHtml, returning the content which you then echo.

for more >>

Wednesday 20 January 2016

Importance of Magento Config xml

The config is the beating heart of the Magento System. It describes, in whole, almost any module, model, class, template, etc. than you'll need to access. It's a level of abstraction that most PHP developers aren't used to working with, and while it adds development time in the form of confusion and head scratching, it also allows you an unprecedented amount of flexibility as far as overriding default system behaviors go.



Path of magento config xml
app -> etc -> config.xml


The other one is local.xml at the same place, it store the database access setting.

Friday 15 January 2016

Benefits of Magneto



  • Security is strong other than others
  • Admin Dashboard for Report Overview, Abandoned Shopping Cart Report
  • Search Engine Optimization; Google Site Map,   URL Rewrites give full control of URL's,   Meta-information for products and categories
  • Advertising tools
  • Control multiple websites and stores from one Administration Pane
  • Multi-Lingual, Support for Multiple Currencies
  • Shipping to multiple addresses in one order
  • Multiple shipments per order
  • Free Shipping
  • View, edit, create and fulfill orders from admin panel.
  • Create one or multiple invoices, shipments and credit memos per order to allow for split fulfillment