Docker-development-environment-for-Magento

It has never been easier to create a development environment. No meter what operation system you use with Docker you can build the exact configuration you need. In this post we will provide steps for creating a sample Magento development environment configured in a single docker-compose.yml file.

How-to-use-the-Magento-2-object-manager-in-your-unit-tests

Every unit test ninja faces troubles whenever he wants to test some real class functionality. Have you ever invoked toHtml() method of some block or beforeLoad() method of any collection? If you want to do it, you will need to mock a lot of classes that depend on other classes and so on. You would need to mock all of them, which would take a lot of time and effort. In a long run, you may blow up deadlines and it would really suck. Yes, you can try to change your testing strategy to avoid invoking such methods. But what if you still need to test them? Let’s explore how I addressed this issue.

n98-magerun tool - swiss army knife for Magento developers

Most of Magento developers face with the problem of the same operations repetition for many times – that takes some time and slows down the development process. So, it’s a wise idea to simplify and speed up some operations during the work, isn’t it? Fortunately, we have a great CLI tool and it makes Magento developers life easier. It is n98-magerun provided by netz98.

Boost your CLI environment – part 3

In the part 2 we have described the powerfulness of terminal multiplexers and reviewed one of the most popular terminal utilities – Tmux. Such kind of multiplexers might greatly boost your performance in handling different CLI operations. Let’s go forward and imagine the trivial situation, when you have created your own handy CLI environment with many terminal windows in one tab or so. You have everything under your hand but sooner or later you have to reboot your computer because of a new system update or installing some applications that require the system restart. In this case, your terminal multiplexer process will be shut down and you will lose all your settings. Fortunately, there are few lovely utilities that help save all your windows/tabs configurations and allow to recreate the entire tabs with windows.

Boost your CLI environment - part 2

In the previous article we wrote about few improvements that you can implement for your Command Line Interface (CLI). But “Perfection knows no limits” and in this article we would like to dig deeper and describe few additional solutions that will make your CLI more powerful in your hands.
Many developers/system administrators sooner or later face with the situation when one terminal window or even few terminal tabs is not the most convenient solution. You want to have everything close at hand: to see all terminal windows at the same time. Sure, you can tile all terminal windows or improvise in some other way but for making the things easier let’s give a shot for a terminal multiplexer.

Alternative way of adding tabs to the Magento product page

In our previous article we have discussed how to add tabs to the product page. After Magento 1.9 has been released people started asking how to handle the product page tabs since the previous method caused different troubles. The reason is in the modern RWD theme, which goes out of the box with Magento 1.9. It uses slightly different method for adding tabs than in the previous versions. So, let’s review how you can easily add own tabs on the product page for RWD-based themes in Magento CE 1.9.

Source, frontend and backend models in Magento system settings

In the previous article we have described how the different settings can be applied to a custom extension. There’s nothing difficult for the simple settings such as text field or text area. But, if you look at the drop down, multiselect or editable items list you’ll notice that these items have additional fields, e.g. source_model, backend_model, frontend_model. Let’s focus on these models and find out more info about creating settings that require data models.

There are many tools in Magento which allow you to view or generate and download different reports. So, we can conclude that Magento system has integrated tools for CSV and XML files generation. It might help in the situation when you need to generate a report for some feed or just export a list of structured data. We would like to demonstrate the small example that adds an ability to generate and download CSV files.
Let’s assume that you have already created your custom extension and wish to add a CSV export functionality. If it’s not the case and you can’t guess how to create an extension, then you can always find the light in our previous articles, for example this one. We called our extension Atwix_Tweaks so in the code examples below we will use this title.