Month: July 2015

Magento Events Scope

Event observers in your module can be used in three different scopes in your Magento store: frontend, adminhtml, and global. Here is how each one looks in your config.xml file: <config> <frontend> <events> … </events> <frontend> <adminhtml> <events> … </events> <adminhtml> <global> <events> … </events> <global> </config> Observers in the frontend section will only get […]

How to Only Show Posts from a Single Category on WordPress

WordPress provides a very simple way for you to show blog posts on a single category. Just apply the following code where you want to display the posts: query_posts(‘cat=1’); while (have_posts()) : the_post(); the_content(); endwhile; Just replace the “1” in cat=1 with the correct category ID and it is good to go. For more details […]

How the Magento Registry Works

The Magento registry is a built in function of Magento core. It is used to store information on a global scale so it can be accessed anywhere within Magento. The information is literally stored in the $_registry property of the Mage class. To register a variable: Mage::register(‘some_name’, $var); To access the registered variable: Mage::registry(‘some_name’); To […]