Categories Don’t Show Up In Layered Navigation in Magento

If you want to make sure layered navigation shows all your categories and sub categories in your search results in Magento, make sure you select the parent category as an anchor. This will cause the category where a product resides to show up in the “Shopping Options” box.

How To Add Recently Viewed in Left Column in Magento

We wanted to add the “Recently Viewed” box in the left column to one of our Magento sites. Magento by default has the recently viewed box in the right.

Here’s what we did:

In page.xml we added this line under the “left” reference:

<block type=”reports/product_viewed” name=”product.recently.viewed” as=”product_recently_viewed” template=”reports/product_viewed.phtml”/>

Next, in template/page/2columns-left.phtml we added:

<?php echo $this->getChildHtml(’product_recently_viewed’) ?>

Where we wanted it to appear in the left column.

There you go, that’s how to add the “Recently Viewed” box in the left column of your Magento site

Using the Magento getSkinUrl Call For Images

If you’re trying to figure out how to call an image up in one of your design template files in Magento, here’s the correct code to make it happen:

echo $this->getSkinUrl(’images/your-image.jpg’);

So for instance, if you’re creating a new left column phtml file for your Magento store and need to call an image from your skin images directory, that command will do it. If you want to do the same thing but calling it from elsewhere, use this command:

echo Mage::getDesign()->getSkinUrl(’images/your-image.jpg’);

That’s it. Hope it helps.