Wednesday 17 June 2009

Quantity Bug

I found another Magento bug today, going to fix it in Agent Ohm first.

When ordering quantities 1000 or greater, Magento cannot parse non-US number formats. In Spain, if you were to order "10.000" of an item, you would expect to get ten thousand of that item. But Magento gives you 10 only. The fix isn't as easy as using Zend_Locale_Format::getNumber (although this function does properly parse the number). Something even deeper is wrong with Magento.

This is just one more issue that points to the fact that Magento undergoes no automated testing before it is released.

The function "getNumber" in Mage_Core_Model_Locale says that it uses the current locale setting, but it does not. The locale is not referenced in the code at all.

Playing with the Zend Framework

http://libertini.net/libertus/2009/03/11/playing-with-zend-framework/

This blog entry is parallel to this entire blog to a certain degree. If you're interested in bogging about code analysis, you might like it.