Magento themes and extensions

Magento (How to fix): One or more of the Cache Types are invalidated: Blocks HTML output.

Posted on August 2nd, 2011 | Posted by admin

Somewhere around Magento 1.5, message from the title of this post begun to pop on every product save.
Although quite anoying, it is quite easy to fix and it seems that’s not a BUG, it is a feature – implemented without automatic block html cache refresh .

Vertical menu in magento

Posted on August 2nd, 2011 | Posted by admin


Vertical Menu display’s your category navigation in left column or right column very simple. It includes : Accordion menu style, Dropdown menu style with nice effect , Tree menu style. It also allows you to choose a display shop by style collapse/expand.


  1. Accordion navigation (collapse/expand) support
  2. Drop down navigation support
  3. Dynamically position in the left or right sidebar
  4. Enhance default shop by with accordion.
  5. Backend management.
  6. Easy to install, just copy and run
  7. HTML/CSS validation
  8. Easy to install, easy to upgrade, just copy to use
  9. Friendly and flexible configuration
  10. Easy to customize front-end via HTML/CSS
  11. Support FREE

Form validation in magento

Posted on July 29th, 2011 | Posted by admin

As you know, Magento uses Prototype as javascript library.  It provides a simple way to validate html form values.

Below is an example:

<form name=”my-form” id=”my-form” method=”post”>
<label for=”firstname”>
< ?php echo $this->__(‘First name’) ?> <span>*</span></label><br />
<input  id=”firstname” name=”firstname” class="input-text required-entry"/>

<label for=”lastname”>
< ?php echo $this->__(‘Last name’) ?> <span>*</span></label><br />
<input  id=”lastname” name=”lastname” class="input-text required-entry"/>


<script type=”text/javascript”>
//< ![CDATA[
var customForm = new VarienForm('my-form');

How to get a block in any where?

Posted on July 29th, 2011 | Posted by admin

By the normal way, you can get a block by using object Layout.

For example,  in a controller:


It is the same with a block or a template file.

But if you want to get a block in a helper, model or any where, what way?

In this case, you can use: Mage::app()->getBlockSingleton(‘module_name/block_name’);

· ·

No comments yet.

Layered navigation, but not quite

Posted on July 27th, 2011 | Posted by admin

Recently I got a chance to rewrite Magento’s layered navigation standard functionality. The request was very specific as the client wanted to keep all of the “filters” visible all the time. For example if  you wish to filter your results by Color (let’s say you have yellow, green, red, blue and magenta) products are filtered but the layered navigation displays all filters. This way a costumer can re-filter the products in current category without the need to return to the category view.

Files that are used for layered navigation are situated in app/design/frontend/base/default/template/catalog/layer/ folder. File used for layered navigation is view.phtml – it shows us all of the filters when we click on a category. File used for active state is state.phtml – when we click on one of the filters it is responsible for the results – so we’re gonna edit this one. So copy the state.phtml from base to your package or theme.

This is the original code in state.phtml: