Magento Themes and Magento Extensions

Creating Block from controller in Magento

Posted on December 31st, 2012 | Posted by admin

There are two types of blocks can be created in Magento

a) Structural Block: This block usually contains the attribute ‘as’ with block tag through which the application will communicate with designated area.

b) Content Block: These are the blocks that produces actual content inside each structural block. It seems like normal template file that are used to show particular data on the page.

Most of the time a programmer needs to create a structural block and need to show it into the content area of the page. Here are the code you need to write for it.


Posted on December 29th, 2012 | Posted by admin

Magento natively integrates CMSfeatures.

Two types of objects are available to allow you to create content in Magento:

  • Pages, which allow you to display general information such as your terms of sale, contact information, store locations, et cetera.
  • Static blocks ( “static” is not quite the appropriate term as discussed below, it means that the content of these blocks is editable directly from the back-office, without modifying php source code), which allow you to enter information to be usually displayed on several pages, such as footers, headers, but also specific informations (predictive site shut down, promotions

How to add a product with custom options into Magento shopping cart from an external site?

Posted on December 27th, 2012 | Posted by admin

This is a follow up post to a previous article I wrote on how to add products into Magento but this time the script includes custom options (attributes) of the product. I used Magento version in this example. Just copy the whole script and save it as index.php.

Magento Tips and Snippets

Posted on December 26th, 2012 | Posted by admin

Magento has become quite a popular system in recent months.. snippets, tutorials, and other resources are in high demand for the system. Let’s look at some pros and cons of Magento and then some useful code snippets..

The Good

All around, Magento beats the competition. Here are just a few highlights if you’re not familiar with Magento:

  • Magento is Object Oriented
  • Magento is secure and scalable
  • Magento has a large community that is rapidly growing
  • Magento can be extended very easily
  • Magento allows for multiple stores and store fronts

Magento: Display Currency Switcher in Header

Posted on December 25th, 2012 | Posted by admin

Magento: Display Currency Switcher in Header

dd the following XML in layout/directory.xml between <default> and </default>

<reference name=”header”>
<block type=”directory/currency” name=”top.currency”  template=”directory/currency.phtml”/>

Add following code in header.phtml

<?php echo $this->getChildHtml(‘top.currency’) ?>

Page 1 of 612345»...Last »