Tag Archives: Magento

Using Magento Enterprise Edition full page cache at your own controller action

Magento Full Page CacheAs a number one open source eCommerce platform with several years of development behind it, I'm sure you'll agree that Magento is one of the most complex pieces of PHP software ever created. Logical consequence of complexity Magento brings to the table is relatively low performance when compared to custom made eCommerce solutions. In order to improve this situation, Magento stacked several layers of caching one on top of another, with full page cache being the topmost layer, and one that's exclusive to Magento Enterprise Edition. Having power of full page cache nearby is great, but I must point out that by creating custom controller action in Magento you don't automatically benefit from performance boost FPC offers. In this article I'll outline how Magento Enterprise Edition full page cache works, and what you need to do in order to take advantage of features it provides at your custom controller action.

Continue reading

Adding layered navigation to custom controller action in Magento

Cart LayersIn my last article I tried to outline Magento way of displaying custom product collection using custom controller action at store frontend. I also made a promise to write a follow-up on the topic covering adding layered navigation to custom controller action with goal of making your product collection easier to navigate. For purposes of writing this article, I'll shift my focus back to Magento extension for managing catalog price rules based sale items, code I originally wrote to demonstrate adding custom layered navigation filter in Magento in one of my previous articles. As a part of this extension, I also created custom controller action used to display only sale items and added the layered navigation to that controller action, something I'll do my best to explain here.

Continue reading

Displaying custom product collection at Magento frontend

Product collectionDisplaying list of products somewhere at store fronted is very common task when developing for Magento. Whether it's featured products, sale items or the new arrivals, most developers take the custom block - custom .phtml approach. To be honest, there's nothing wrong with that if you have a good reason to roll your own solution, but 99% of the time, Magento way should be the only way. With that being said, idea behind this article is demonstrating Magento way of displaying custom product collection at store frontend by using Magento built-in blocks and templates combined with a little bit of layout magic.

Continue reading

Create a custom layered navigation filter for filtering sale products in Magento

NavigationRetail store project I'm currently involved with heavily relies on Magento catalog price rules to offer pre-cart discounts on selected articles. Even though Magento CatalogRule module does most heavy lifting when it comes to placing products on sale, code allowing logical organization and filtering for sale products at store frontend is left to the solution provider's imagination. In this article I'll cover the filtering part of this scenario, specifically how to make it possible for customer to filter sale and not on sale products while browsing category view pages. There are couple of ways to tackle this problem, with creating custom layered navigation filter being probably the most logical approach.

Continue reading

Catalog price rules not being applied after product save in Magento CE 1.8.0.0

Magento LogoMagento project I'm currently in charge for has had the catalog price rules not sticking issue for some time now. This issue has been first reported as catalog price rules being unapplied on their own without any obvious pattern. Since, due to nature of it's catalog, catalog price rules are very backbone of the store in question, situation where prices change on their own was certainly problematic. Even though this Magento project wasn't of this edition or version, it was using Mage_Catalogrule module that was shipped with Magento Community Edition 1.8.0.0. Later research revealed that this issue has been fixed in Magento CE 1.8.1.0 (and all Magento editions and version derived from it), but immediate upgrade wasn't viable alternative at the time because I didn't know what causes this issue and has it been fixed upstream. Allow me to share debug path I had to take to get to the bottom of this.

Continue reading