Last month, Magento2 hackathons just happened (twice!) in our Wrocław-based office. While curing up some bugs, members of Magently team spontaneously decided that, they should arrange a hackathon and push a significant numer of repairs further up. And so they did, with a result of 8 major bugs fixed and over 300 phrases translated!


Magento was built as a flexible platform, with a high level of customization possibilities compared to other e-commerce platforms. Contributions of the Community members are the foundation of the open source version of the platform and they include code patches fixing bugs or adding new functionalities. Magento uses GitHub for source code version control. The best way to deliver fixes to the Magento source code is via GitHub Pull Requests

Hackathons aren’t just coding maratons 

As I understand the hackathon’s idea, it is about a period of time, when a group of people is working together in order to resolve a certain problem, build a solution or answer a time-demanding issue and pass the milestone. Coding is part of that activities, but it is not the whole. “Hacking” involves communications and research, requirements gathering and testing. Hackathons have reached for human’s great ability to solve problems together in a team. During such an event, the collective mind greately excels the single one – it is not simply adding up, but multiplying the potential of individuals.

Magento2 bug fixes

Monika, Project Manager: During our Magento2 hackathons, we have fixed 8 bugs in total. At the moment, two of those bugs are already merged, while the rest is either waiting for code review or is still in the testing phase.

Maciek: addExpressionFieldToSelect issue

One of the bugs I have worked on was about overriding the addExpressionFieldToSelect method effect by the addFieldToSelect method in the Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection class. When you’ve used the addExpressionFieldToSelect method first and then wanted to use addFieldToSelect, the effect of the first one was disappearing. Now, when writing your code, you can use them in any order you might need to.

Adrian: Special Price bugs

I worked on fixing an issue affecting the Special Price feature when it was displayed without tax. The problem was that on the product page, Special Price without tax was actually showing a regular price without tax. All prices are now displayed correctly.

The second fix concerned the situation in the backend. Special Price set for Bundle Product is a percentage, but Magento treated it as a price value and rounded it up to two decimal places, which caused problems later on due to an incorrect conversion of percentages. The repair consisted of preventing this value from being rounded.

Czarek: translation bugs in custom themes

What didn’t work properly was translations for multiple themes within one store platform. If one or more product categories were using a different theme than the rest of the shop pages, incorrect translations were assigned. The same happened with the customised product pages. My fix helps to maintain a unified translation for all themes. The code is not yet merged as it waits for my small fix related to functional tests.

Tomek: Custom currencies in single store mode

I worked on restoring the possibility of returning to the default currency in the backend configuration. Before, given a situation that single store mode was on, it was not possible to restore the default value for the currency, after it was changed to custom in the admin panel in Stores -> Currency Symbols. The core team has already accepted the change.

Krzysiek: Cart Price Rule bug in Category Selector

The first bug I have fixed concerned the Category Selector, which didn’t work properly when adding the Cart Price Rule (the rule for adding discounts in the basket view). After picking some categories from the list, they were not checked anymore when reopening the Category Selector. The bug was clearing out the chosen categories when they were of level 4 or higher (taking Default Category as level 1). Now it all works just fine.

Krzysiek: hyphen bug in Shipping Table Rates

My problem has concerned the use of the American zipcode format with local extensions. Although the shipping rate in the ZIP-4 format was specified in the table for e.g 12345, a customer with a 12345-1234 code (where 1234 is a local extension) did not receive a shipping rate option from the Shipping Table Rates.

With my fix, the code without a hyphen in the Shipping Table Rates (e.g 12345) will “catch” all of its extensions, such as -1234 or anything after the hyphen (where it’s normally being put). The problem was reported on GitHub by an American developer, but it could apply to any country where there are postcodes with dashes. The fix solves the problem globally.

Additionally, the patch I’ve made extends some of the possibilities of Shipping Table Rates. When describing a shipping rate, you can specify it for the detailed code, e.g 51-120, but leaving it with 51 would only apply the rate to every code that begins with 51, e.g 51-010, 51-280.

In default shop theme named Luma, Magento2 offers no translation for Polish users. Here you can see the error message for no results in product search. In default shop theme named Luma, Magento2 offers no translation for Polish users. Here you see how the message for succesful add to cart action is being displayed.

Contribution to the polish version of Magento

Monika: We needed something new in our everyday work. During a weekly meeting of our team, we decided that we can spare some time and make a regular hackathon, aimed not only to fix the bugs. While developers worked on the code issues, Project Managers translated 300 phrases (total of 524 words) from Magento2 user’s environment, including Braintree, captcha, catalogue and company modules. Magento2 will be a lot friendlier for Polish users after the translations’ release in the next language pack update.

Magento2 hackathons: a great team building tool

9 of our developers and 3 of our Project Managers were involved in the hackathons. Besides the hard work, it gave us a lot of positive energy, too. We really like working together – and this kind of event gets us even closer as a team. The satisfaction of achievement matters a lot, especially when it’s resulting from an energy of co-working group.

I think it is the reason of helping others, helping the community that gave us the kick for this challenge. We thought: If there is only a little time and so much to be done, why don’t we just focus for a day or two on the obstacles so that our team and other Magento2 developers can take future advantage?