browse the blogs

[ 3 Feb 2017 ]

How to clear billing form validation errors when using Magento UI components:

A “quick” (har har) answer from me on how to reset a form field’s validation state in the Magento 2 checkout application. This is also a nice example of how, no matter how far we progress with computers doing things for us, it’s always going to be useful to reason about how a computer does the things it does. Without the Magento 2 documentation I’ve written, or the tooling I’ve built, there’s no way this question gets answered without an individual developer spending days or weeks on it.

If you want to be successful with any customizable/programmatic information system – hire developers who know …

[ 2 Feb 2017 ]

A useful code snippet that came out of a discussion on the Patreon slack today.

], function(quote, rateRegistry){
//get address from quote observable
var address = quote.shippingAddress();

//changes the object so observable sees it as changed
address.trigger_reload = new Date().getTime();

//create rate registry cache
//the two calls are required
//because Magento caches things
//differently for new and existing
//customers (a FFS moment)
rateRegistry.set(address.getKey(), null);
rateRegistry.set(address.getCacheKey(), null);

//with rates cleared, the observable listeners should

[ 25 Jan 2017 ]

One the curious/frustrating bits of approaching Magento 2 as a traditional, full-stack Magento 1 developer, is the seemingly incomplete php bin/magento. While this command allows you to clear your Magento cache

php bin/magento cache:clean

and a command to generate “static content” (front end javascript, css, etc. files not generated by the PHP code in the application)

php bin/magento setup:static-content:deploy

It doesn’t contain commands that clear out the Less CSS cache in var/view_preprocessed. The problem? The PHP team at Magento seems to have shifted that responsibility to grunt, the front end build tool for Magento.

The Magento dev docs site has decent instructions (for 2.0 and 2.1) on setting up grunt (which has a precursor of setting up npm (which has …

[ 24 Jan 2017 ]

Progress continues on No Frills Magento 2 Layout, with Patrons receiving full access to the rough draft and initial source code samples. I just finished the section on Magento 2’s Less handling – basically an update to my article on the same topic last year. Here’s an excerpt that wraps up the section.

For folks working for a certain sort of interactive agency, Magento 2’s choice of Less was somewhat disappointing. Other processors like Sass and Stylus seem more popular with this set of developers. Because of this, we’ve seen some efforts to create alternate CSS workflows using these systems.

While these are interesting projects, and do create a workable alternative …

[ 23 Jan 2017 ]

After update from 2.1.2 to 2.1.3 causes store to redirect to wrong domain · Issue #8245 · magento/magento2:

On the other end of the spectrum, it sounds like Magento 2.1.3 broke how the System Configure system handles fallback values. The lack of a clear response from Magento means we don’t know if they consider this new behavior a regression or fixing the old behavior.

[ 23 Jan 2017 ]

Magento’s response to the uiElement Observable Cloning Problem:

One of the first responses in Magento 2’s GitHub issues that hasn’t injured my eyes from the eye rolls. More like this please.

[ 17 Jan 2017 ]

How to Respond to and Fix A Bug:

Here’s a small highlight from pestle’s issue tracker. A user ran into a situation I hadn’t considered when I created a command. I wrote my command assuming there wasn’t already a di.xml file in place, or if there was that it would already have a certain set of nodes. This user already had a di.xml file they’d created manually.

Key parts of this response

  • Respond as quickly as possible to acknowledge you’ve received the issue. Do this in a human way, not a robotic way. Even if the issue’s going to be something you can’t fix, acknowledging the effort with a human response is key if you …

[ 30 Dec 2016 ]

In [two](
) previous articles, we talked a bit about Magento’s remote Knockout.js template files, and their customer tags/attributes.

I’ve been doing a bit more exploring around this feature, and I’ve discovered the previous list of custom tags and attributes was incomplete. In addition to the tags and attributes listed in the “Design Problems” article, we’ve also got the following tags

<scope args="..."/>        : <!-- ko scope: ... --><!-- /ko -->
<translate args="..."/> : <!-- ko i18n: ... --><!-- /ko -->
<repeat args="..."/> : <!-- ko repeat: ... --><!-- /ko -->
<fastForEach args="..."/> : <!-- ko fastForEach: ... --><!-- /ko -->
<render args="..."/> ...

[ 29 Dec 2016 ]

Tips for Running Magento 2’s Test Suite:

A quick writeup of some issues you’ll run into if you’re trying to run Magento’s test suite.

[ 27 Dec 2016 ]

Magento CE 2.1.3 database diagram – Anna Völkl:

Community Stalwart @rescueann just released the Magento 2 follow-up to her popular Magento 1 database diagram post.

Beyond the super useful utility of having something like this pre-generated, Ann’s also spent a significant amount of time grouping related tables together. Even experienced Magento developers may learn a thing or two scrolling around the gigantic image.