Magento block caching

Share
Posted on February 23rd, 2011 | Posted by admin

Recently we were working on speeding up parts of client site which had usual problem of slow page loading caused by complicated configurable products. To solve the problem we were experimenting with extending core Magento caching capabilities.

Magento has built in predifined system of block output caching. Its block abstract has Zend_Cache caching capabilities that can be modified for your own needs. I’m showing here an example of caching whole product view block, however this is just a specific example of how things works, problems are different and requires different approach and solution.

I will start with some external reading and example itself. There is great article on Magento Wiki about this topic, along with category cache example on Magento forums.

What’s in a block? – Some Magento “basics”

Share
Posted on February 23rd, 2011 | Posted by admin

Many developers are familiar with the MVC (Model View Controller) design pattern that is seemingly ubiquitous throughout web frameworks. Looking through the code in Magento, however, we see many other components besides the M’s the V’s and the C’s.

Each module  (a “module” meaning the separate directories within the “app/code/core/Mage” directory that comprise of Magento’s different functional areas) contains the usual Controller and Model. You’ll see that within each module, there are no Views (more on this later). You’ll also see extra tidbits, such as “helper” , “etc” and “sql”. These are (and are not) standard within the Zend Framework context and will not be discussed in this article. In these modules are also the sort of files which we work with very often. The all powerful block! This article will attempt to (hopefully accurately) describe just what a Block is and how it’s used.

Custom Category Images Listing Block Tutorial

Share
Posted on February 22nd, 2011 | Posted by admin

Recently, I just finished coding out a website for a client in Magento. You can view the site at www.3graces.com, it was a full switch from some old legacy asp shopping cart to Magento. Im really happy with the way things turned out and the client is too, Magento just has so many wonderful features built-in.

One feature that I found wasn’t built in was a way to display each sub-category with an image, and its name on a landing page. Magento has a nice feature which allows you to assign an image to a category, but doesnt give you a way to make that show up in a listing somewhere.

I setup 6 main categories, with each having multiple sub-categories and I wanted to have a way to show all those sub-categories to the user on a nice page that was pleasing to the eye. Here is an example: Payot Paris by Category.

What’s in a block? – Some Magento “basics”

Share
Posted on February 21st, 2011 | Posted by admin

Many developers are familiar with the MVC (Model View Controller) design pattern that is seemingly ubiquitous throughout web frameworks. Looking through the code in Magento, however, we see many other components besides the M’s the V’s and the C’s.

Each module  (a “module” meaning the separate directories within the “app/code/core/Mage” directory that comprise of Magento’s different functional areas) contains the usual Controller and Model. You’ll see that within each module, there are no Views (more on this later). You’ll also see extra tidbits, such as “helper” , “etc” and “sql”. These are (and are not) standard within the Zend Framework context and will not be discussed in this article. In these modules are also the sort of files which we work with very often. The all powerful block! This article will attempt to (hopefully accurately) describe just what a Block is and how it’s used.

Page 2 of 2«12