Archive for the ‘Frameworks’ Category

We’re Hiring!

Wednesday, July 29th, 2009

Imaging walking through the warehouse to your desk and hearing the sounds of motorcycle engines roaring as the smell of racing fuel fills the air. Does this sound like a great way to start your morning? If so, we have a job for you.

The company I work for RidersDiscount.com is looking for a PHP Developer to help us build our next generation web presence. RidersDiscount.com is a successful, growing online retail company that is seeking candidates in the West Michigan area to fill a full-time on-site position. Below is a link to the official job posting.

PHP Developer Position at RidersDiscount.com

If you are interested feel free to respond to the craigslist job posting or you can email me your resume at aj at ridersdiscount dot com.

Storing Magento blocks in a subfolder

Wednesday, June 24th, 2009

While integrating Solr with Magento I decided to create a superclass for the facet blocks to extend since the majority of their functionality was rather similar. I started by creating a file named Facet.php with the class Company_Search_Block_Facet in app/local/Company/Search/Block that extended the Magento_Core_Block_Template class. I next created the subfolder app/local/Company/Search/Block/Facet to store all my facet blocks and a file named Size.php that extended Company_Search_Block_Facet. The tricky part was getting it to work properly. I attempting to add a facet blocks to the right column using the following code.

$this->getLayout()->createBlock(’search/facet/size’);

The problem was it loaded my superclass Company_Search_Block_Facet instead of my child class Company_Search_Block_Facet_Size. After digging through some of Magento’s source code I found the solution. You need to use an underscore instead of a forward slash to load blocks in subfolders.

$this->getLayout()->createBlock(’search/facet_size’);

Now I can easily store my blocks in a subfolder keeping my Block folder nice and tidy.