Posts by Marin Grizelj

Declare static types to keep bugs away?

Introduction

A lot of programmers feel that for any larger projects static types offer a huge benefit.
Readability too, not only validation.
Some argue that tests can replace types, I agree if we are only talking about code validation.
But static types are empowering in other situations too. Reading code is easier since types describe code and fewer assumptions have to be made about inputs and outputs. Basically, additional documentation which is always in sync with the code.

Read more

Changing default category sort direction in Magento

While Magento offers a lot of power when you want to customize category pages and their impressions on your users, there are still some options that are not provided but would come in handy. One common desire is to promote expensive products and ability to reverse sort direction of products in category is a simple way to achieve that.

Functionality like that will require some custom coding, but no fear – it is rather straightforward. 🙂
Prerequisites: Magento module creation, setup scripts, block rewrites.

Read more