Listing products by attribute

Share
Posted on April 27th, 2011 | Posted by admin

This is step by step tutorial for the beginners that will show you how to list products by attribute.
I will start with functions that Magento already has built-in: New products and Promotional products.
All the instructions below is made from Magento Professional 1.9.0.0

Listing products with attribute New

You can find settings for defining New attribute in Magento administration under Manage products in Products management. For this tutorial I will use CMS page called Homepage as example.
In CMS Page layout -> Layout Update XML is defined template for CMS page by

MySQL – Left, Right, Outer or Inner Join? No – the SELF JOIN

Share
Posted on April 27th, 2011 | Posted by admin

Hi to all of you! Today, I’m going to explain SELF JOIN in MySQL – I’ll answer why and then how should you use it.

But first, a short explanation. I’m going to explain a non often used SQL that came in hand recently. If you are still learning MySQL, please refer to some basics first – a good start. And now, to the fun part. :D

Why do anyone need SELF JOIN?

Well, SQL self-join is very useful when you want to retrieve related data stored in one table such as organizational structure. Its basically an inner join with reference on the table itself.

Taming magento errors display

Share
Posted on April 27th, 2011 | Posted by admin

Murphy says: “Anything that can go wrong, will go wrong”. When it happens to your store it’s best to get the information about it ASAP and present the error in the most humane possible way. Let’s do it!

Since ever Magento presented it’s errors on the front-end for everyone to see and it was good for the developers but once the site has gone live that couldn’t be an option anymore. In Magento 1.4 those errors are now hidden and all your customer could get about the actual error was the “error number”.

Using local.xml for overriding or updating xml structure

Share
Posted on April 26th, 2011 | Posted by admin

Over the past 3 years working with Magento and complying with the “Magento way” of managing code, usage of the “local.xml” file presented itself as one of the best ways to update xml layout.

This article is aimed at those who are not aware of the “local.xml” method. If you’re already using it, kudos to you. If not, you definitely should use it.

The idea is simple: Use only one file, the local.xml, placed inside your theme’s layout folder to override or update all xml references for that theme.

Benefits:

1. Only one file to manage overrides and updates
2. No need to have any other .xml file for your theme since it’s dependent on the xml files inside the base folder
3. Every change to the local.xml file is evident so there is no need to search for changes inside xml files

Zend Framework navigation with breadcrumbs

Share
Posted on April 26th, 2011 | Posted by admin

It’s been a while since I last time played with beauty of Zend Framework.

Each time I check new features it seems to me that the things are more simplier than the last time,
I might be wrong (I wouldn’t bet on that) or I’m just getting better :)

Let’s check this piece of cake – how you can create navigation with breadcrumbs in Zend Framework project.
As many things in Zend Framework you can get same features in different ways,
so the same thing goes with the Zend_Navigation class.

First of all you need to decide which way you will choose:
- navigation with xml setup file or
- from application.ini file