geschrieben von Fabian Schmengler
am 21. Juni 2017 - 23:02

Magento architect Anton Kril asked about opinions on XML based tests:

#magento twitter, what are your thoughts about writing tests in XML?

— Anton Kril (@AntonKril) 20. Juni 2017

My answer does not fit into a Tweet, so here’s a short blog post.

My first thought was “please no, there’s enough XML already”. But the explanation made me think.

Magento covers a scenario with test. Extension that modifies that scenario, also modifies its test with XML that is merged to original test

— Anton Kril (@AntonKril) 20. Juni 2017

Currently the core test suite does not have much value in custom projects, because the site specific settings, themes and modules…

geschrieben von
am 20. Juni 2017 - 18:41

A simple mailtrap extension for Magento 2. Mailtrap is a service that lets you point your development instances at an SMTP server that accepts mail, but doesn’t deliver it. Instead mailtrap collects all the mail in a single INBOX. If you’ve ever accidentally emailed an entire customer list with a subject line like

Subject: Testing, hope this s——t works.

you’ll instantly see the value.

The Magento extension is also a simple example of how to hook into the Magento\Framework\Mail\Transport class with a custom preference and change the behavior of the email system.

geschrieben von PAJ
am 20. Juni 2017 - 18:30

As I started building Docker service container images for Magento 2 CE development I got interested in the concept of dynamic service load balancing on a single host. Having already created a dynamic load balancer using NGINX I wanted to do the same for Magento 2 using Varnish.

My Magento 2 service container images include REDIS services for the Magento session and system cache and a Varnish service for the full page cache. Varnish is an HTTP accelerator designed for content-heavy dynamic web sites and is the recommended full page cache system for Magento 2.

Magento 2 Docker Network

Varnish is configured via the Varnish Configuration Language (VCL) config file. By configuring…

geschrieben von Vesna Mijatovic
am 14. Juni 2017 - 16:16

If you have plans to start a new website on Magento and don’t know where to start, or if you already have an existing website and you’re thinking of revamping it, then you might find this article interesting.

Creating Magento websites might seem as a simple process that includes installing and configuring Magento, choosing some of the predefined themes available, importing products and setting payment and shipping options.

However, there is more that meets the eye. The truth is, there will always be some additional things you’d like to improve on the purchased theme and custom functionalities you’d like to add on top of the default Magento, so something that might seem simple and straightforward at start can become more demanding and require a certain amount of planning.

Also, in many cases you won’t even be interested in a purchased theme and you would like your site to be unique and

geschrieben von Tomislav Bilic
am 14. Juni 2017 - 10:56

After 9 years in business, Inchoo won The Golden Marten Award (Zlatna kuna), traditionally given to the most successful local companies by the Croatian Chamber of Economy. We received it as the best small company in Osijek-Baranja County. Why did we win it for 2016? There were 21 distinct areas that were rated and Inchoo had very high scores in employment increase, average salary, non-material assets, financial stability and self-funding.

Osijek-Baranja County

President of County department of Croatian Chamber of Economy, Zoran Kovačević, has noted that all awarded companies have very high export ratio in total income. Inchoo has 85% of exports. Total income of our County is growing last three years. And only in 2016, it grew by 11%.

Other results are also quite good. International exchange is growing. Last year it went over 5 billion Croatian Kuna (HRK). Investments in long term assest are booming with the rate of 40%, primarly in food and paper industry,…

geschrieben von
am 13. Juni 2017 - 20:18
This entry is part 7 of 7 in the series Pestle. Earlier posts include Pestle 1.1.1 Released, Pestle 1.1.2 Released, Magento 2 Setup Migration Scripts, Pestle 1.2.1 Released, Sending Text Messages with PHP, pestle, and Nexmo, and Pestle 1.3 and AbstractModel UI Generation. This is the most recent post in the series. We interrupt this Modern Javascript series to let you know there’s a new release (v1.4.1) of pestle available. Pestle is both a simple PHP command line framework for sharing functions, as well as the world’s preeminent collection of Magento 2 code generation routines. It’s an integral part of […]
geschrieben von PAJ
am 13. Juni 2017 - 17:39

Whilst building containers for Magento 2 I came across the docker compose scale command which allows you to easily duplicate and scale containers running a service in Docker.

For example if I have a web application service called php-apache

docker-compose scale php-apache=10

Will start another 9 containers running the php-apache service giving me 10 containers running the same php-apache web application service.

Of course if you want to have real resilience and load sharing Docker swarm is the solution so the question is, are there any benefits from scaling a service in mulitple containers on a single host?

Well, yes, because you can still load balance the traffic to your application and achieve a basic level of container resilience.

Scaled services will only work for applications that use private…

geschrieben von Christian Münch
am 9. Juni 2017 - 17:09

Hi everyone,

after our last release before Magento Imagine 2017 we are back again with a new release for you guys.
The new release contains one new command and some ports of n98-magerun1 features to existing n98-magerun2 commands.
Also we fixed some bugs related to the DB logic or improved the developer console.

New Command index:trigger:recreate

The new command is handy to recreate triggers on the fly. If you are not familiar with the new index logic: If you change the index mode of an indexer in Magento 2 the system will create DB triggers on the fly.
If one of the “mview.xml” files is changed the triggers should be regenerated. Why do we need this command? With this command you can force to regenerate the triggers during develpment. It is not needed to wait for a cronjob which triggers the regeneration. Also there are some…

geschrieben von Sergei Prakapovich
am 6. Juni 2017 - 19:24

A typical online store cannot manage properly without search engine optimization. On-page optimization should never be neglected in favor of affiliate links and citations (off-page optimization). The biggest advantage of on-page optimization is that it is something you can fully control and manage.

Magento 1.X is not as perfect as it could be regarding SEO. Many pitfalls weren’t taken into consideration at all. The users needed something more professional, stable, and flexible. That’s how Magento 2 appeared. The second version of Magento drastically differs from the first one. The developers have taken into account previous…

geschrieben von Adrian Bece
am 6. Juni 2017 - 12:42

Magento’s layout system has been vastly improved in Magento 2 to be more accessible, more powerful and to be more streamlined. But, for some reason, only a very small subset of layout functions is made available for use in Magento 2 Admin (category layout XML updates, to be more precise). In this article, we’re going to show a very simple way of bypassing this pesky restriction.

Layout update restrictions in Magento 2 Admin

In the interest of keeping the example simple and straightforward, let’s say we want to remove the page title element from a specific category. In Magento 2 admin, in the category layout update XML field we add the following line.

<referenceBlock name="page.main.title" remove="true" />

And when we click save, we get the following error:

Please correct the XML data and try again. Element ‘referenceBlock’: This element is not expected. Expected is one of (referenceContainer, container,…

geschrieben von Hrvoje Ivancic
am 6. Juni 2017 - 8:23

The Fastly CDN will sometimes return a 503 error due to various issues that can occur. The generic text associated with a 503 error is “Service Unavailable” and it can mean variety of things. This default error response can be confusing to the customers and have a basic look and feel.

This guide will show you how to set friendly or prettier 503 custom error page through Fastly module which will be served when:

  • When origin returns a response status greater than 500
  • When origin is down (i.e unhealthy, timeout, etc)

To set custom Error page, go to:

Magento admin > Stores > Configuration > Advanced > System > Full Page Cache > Fastly Configuration

Under the Fastly Configuration, click on the Error/Maintenance page:

geschrieben von
am 5. Juni 2017 - 16:59
This entry is part 4 of 4 in the series Modern Javascript for PHP Developers. Earlier posts include Modern Javascript for PHP Developers, Express and NPM for PHP Developers, and Client Side Javascript, Modules, and Webpack. This is the most recent post in the series. In our last article we covered the webpack project, and used it to demonstrate the modern javascript workflow of Download modular source code packages using npm Write a modular program Compile a modular program into a single file Include compiled program via a <script/> tag Reload the page While this workflow may seem familiar to […]
geschrieben von
am 2. Juni 2017 - 1:15
Reserved Words in Magento 2 URL  Paths:

A StackExchange self answer where I use a plugin to work around the reserved-PHP-symbol-in-class-name problem that can plague Magento 2 URL routing. What’s extra baffling about this is Magento has a fix coded up, but only applies it to one URL segment.

I suspect this is less baffling if you can gives up the idea that Magento 2 should retain its the rapid application prototyping roots of its ancestors.

geschrieben von
am 1. Juni 2017 - 21:47
Magento 2 - Form Validation:

A StackExchange post that contains most (all?) of the CSS classes that can control Magento 2’s form validation. Magento seems to apply the validation rules on all form submits – although I haven’t dug too deeply into that one so caveat emptor etc.

Also, a bonus for folks who read these Tumblr desciptions — here’s a quick bit of javascript that will take M1 style HTML and make all the fields required in an M2 context.

require(['jquery'], function($){ $('.required-entry').each(function(key, element){ $(element).attr('required','required'); }); });

Useful if you have a complex form built with a combination of raw HTML, PHP in phtml, and PHP in class files (i.e. – if you don’t want to track down and change ever class="require-entry" to required=required)

geschrieben von PAJ
am 31. Mai 2017 - 19:58

I use FHEM as the engine for home automation tasks on my Raspberry Pi. This is how to build and run FHEM as a container in Docker on your Raspberry Pi Zero, Pi2 or Pi3.

fhem docker container installation

Install Docker

Installing Docker is a no brainer

curl -sSL | sh sudo usermod paj -aG docker reboot Install docker-compose

Docker-compose makes building, starting and stopping Docker containers really simple.

apt-get -y install python-pip pip install docker-compose Build the container

Pull the container build files from github and run docker-compose build to build the container image.

git clone cd docker-rpi-fhem docker-compose build Start the container docker-compose up -d Connect to FHEM

Enter the following url into your…

geschrieben von Katarina Dijakovic
am 30. Mai 2017 - 12:58

Our design team switched to working in Sketch a while ago but it wasn’t until version 43 we really started seeing some opportunities to change our workflows more significantly. It was also an opportunity for more designers to work on the same project as well as collaborate with developers more easily.

The case of version 43

With Sketch version 43, Bohemian Coding quietly announced – a revised file format. Behold. They introduced a new file format that allows reading and writing .sketch files manually or programmatically and go from Sketch straight to implementation. What does that mean for our workflow? Sketch had a file format that was workable not only from the design side but developer side too.


geschrieben von
am 27. Mai 2017 - 19:24
Earlier articles in this series included server side javascript that looked like this var http = require('http'); That is, we used a function named require to load a javascript module. A module is a way to organize and load other javascript code in a way that doesn’t conflict with the code in your current file. As PHP programmers, we don’t get code modules. PHP’s include and require statements allow us to organize our code into files, but those files are all mashed together in one global namespace. PHP namespaces came close to giving PHP programmers modules, but incomplete functionality and […]
geschrieben von
am 26. Mai 2017 - 18:03
Magento custom Knockout.js bindings | Magento 2 Developer Documentation:

It might have taken 11 months, but it looks like Magento finally gave its dev docs team the resources they needed to document the UI Component Knockout JS custom bindings.

geschrieben von Maja Kardum
am 25. Mai 2017 - 14:15

We are proud to announce an awesome Responsive Web Design workshop by one and only Vitaly Friedman! This writer, speaker, author and editor-in-chief of Smashing Magazine will get up on stage at Inchoo’s hometown Osijek with smashing workshop “New Adventures in Responsive Web Design”.

Faculty of Economics at Osijek will be the main point of this event on June 17 from 9AM to 6PM.

What’s the “New Adventures in Responsive Web Design” about?

With HTTP/2, Service Workers, Responsive Images, Flexbox, SVG and Font Loading API now available in browsers, we all are still trying to figure out just the right strategy for designing and buildings responsive websites just in time. We want to use all of these…

geschrieben von
am 24. Mai 2017 - 18:13
JavaScript unit testing with Jasmine | Magento 2 Developer Documentation:

Jasmine’s a testing framework for javascript code – I didn’t know until today that Magento 2 had setup a framework for these tests.

(Via the tremendous Vinai)