geschrieben von Sebastian
am 27. April 2017 - 18:26

Als Magento-Shopbetreiber, -Agentur, -Entwickler, -Designer oder -Servicepartner stellt sich früher oder später die Frage ob es sich lohnt den Weg nach Leipzig auf sich zu nehmen und mit 600 anderen in stickigen Konferenzräumen zu hocken. Um einen besseren Eindruck zu bekommen habe ich Entwickler und Personen aus der Magento-Community um ein kurzes Feedback gebeten. Diskussionen […]

Der Beitrag Warum soll ich zur Meet Magento gehen? erschien zuerst auf Mag-tutorials.de.

geschrieben von
am 26. April 2017 - 22:33
Fooman's Magento Imagine 2017 Wrap Up:

Another developer oriented Magento Imagine 2017 wrap up. Include the slides from Kristof’s talk on Magento and composer.

geschrieben von
am 26. April 2017 - 21:37

Over in my Patreon slack, a patron came to me with the following layout handle XML chunk.

This block of XML would successfully remove the block named breadcrumbs, but it would not successfully remove the block named product_list_toolbar.

This is one of those places where Magento’s lack of documentation and/or a cogent systems philosophy really bites practitioners in the butt. Even as an experienced M2 developer, my mind came up with multiple possible causes

  • That was <remove/> in M1, will <remove/> work in M2?
  • Is remove=true something that works by coincidence but isn’t supported?
  • Is remove=true something the works for only blocks or works for only containers? (you can use referenceBlock and referenceContainer interchangeably in Magento’s core)
  • Is handle loading order to blame here?

Worse – because…

geschrieben von
am 25. April 2017 - 18:46
Magento 2 Module for Custom Reporting Grids:

Haven’t tried it yet, but this looks like a Magento 2 module that will let you easily create new Reporting Grids with a simple SQL statement.

geschrieben von
am 22. April 2017 - 22:03
Imagine2017 Summary from Yiero Founder Jisse Reitsma:

A nice, succinct wrap up of Magento’s announcements at Imagine 2017. Lots of third party service acquisitions for EE users, not much public-news/investment on the open-source/CE/independent-developer side of things.

geschrieben von Robert Popovic
am 20. April 2017 - 8:23
magebase-analytics-snapshotmagebase.com, the domain and this website is for sale!

To the left is a snapshot of the current 2017 traffic to the site. In its heyday, Magebase was consistently attracting over 1000 sessions per day, this has diminished only due to inactivity but the site is well established and can be managed to attract a solid audience with up-to-date Magento 2 articles, etc.…

geschrieben von
am 19. April 2017 - 19:11
Headless Magento 2 Resources:

“Headless Magento” – that is, an ecommerce store whose user interface uses some other technology stack for the UI/UX (i.e. javascript) while relying on Magento’s REST API endpoints for store functionality – is a hot topic in the Magento world. While this approach can explode a project’s budget (you’re reimplementing the a front-end store and any extension functionality) it is, none-the-less, popular with agencies looking to put their javascript engineering teams to work.

If your sales team has thrown you in the headless deep-end, the sitewards/headless-magento2-resources and ishakhsuvarov/going-headless GitHub repositories are two small projects that are tracking resources for developers looking to implement a headless Magento 2 system.

geschrieben von Igor Furseev
am 19. April 2017 - 11:04

Magento 2 Command-line interface (CLI) tools differ from those in Magento 1. In Magento 1 you could simply add a script to the “shell” directory, include abtract.php, and extend from it. Magento 2 is a bit more complicated. This post will show you how to create a simple CLI script in Magento 2.

First of all we will need to declare a module (you can use an existing one, if you have it). We need to create: registration.php, composer.json (actual path: app/code/Atwix/Shell/composer.json), and etc/module.xml:

<?php /** * @author Atwix Team * @copyright Copyright (c) 2017 Atwix (https://www.atwix.com/) * @package Atwix_Shell * * path: app/code/Atwix/Shell/registration.php */ \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Atwix_Shell', __DIR__ ); { "name": "atwix/shell", "…
geschrieben von PAJ
am 18. April 2017 - 12:43

In part one of the Alexa PHP Hello World example we created a very basic skill and a PHP app to show how to handle Amazon Alexa IntentRequest data and provide a response. In part two let’s extend the code to allow us to create interactive prompt and responses.

In this example we ask Alexa for a “clever quote”, Alexa will give us the quote and ask if we want another. If the user replies yes, Alexa reads another quote and prompts again until all the available quotes have been used.

Alexa Clever Quotes Alexa Prompt and Response

To allow this prompt and response interaction we simply tell our skill to keep the session open when we require a response, and we store the data we need for the session in the session attributes…

geschrieben von Fabian Schmengler
am 11. April 2017 - 10:00
This is my weekly Kata post. Read the first one to learn what it is all about.

Last week: Boolean Expression Engine

To the Kata description
Scroll down to this weeks Kata description

I was determined to build a real compiler for exercise, knowing that it would be a bit over the top for this particular challenge. The first step was a lexer that converts an input string to a list of tokens.

So

(x&y)|z

became

Token::openingBracket(), Token::variable('x'), Token::and(), Token::variable('y'), Token::closingBracket(), Token::or(), Token::variable('z')

At this point it’s pure syntax checking without context, so “)(&&&1” would be tokenized without errors, so I could implement it with a backtracking algorithm. Using TDD worked well here.

The next step…

geschrieben von Fabian Schmengler
am 11. April 2017 - 10:00
Dies ist mein wöchentlicher Kata Post. Lies den ersten um zu erfahren, worum es hier geht.

Heute nur auf Englisch

The post TDD Kata 14 – Exclamation Mark Series appeared first on schmengler-se.de.

geschrieben von Simon Sprankel
am 7. April 2017 - 22:11
My tweet about my Magento Imagine 2017 recap got a whole lot attention. Thanks for the positive feedback so far! What brought up a broader discussion was my sentence „For Magento, fairly naked actresses at the party obviously do not contradict with a session about diversity in tech“. I slightly edited this sentence in the … Female Artists On Conferences – The Gender Discussion weiterlesen
geschrieben von Simon Sprankel
am 7. April 2017 - 9:13
Magento Imagine always sounded like fun and by far like the most professional and biggest Magento conference in the world. Until now, I was too stingy and found it too expensive to go there. Paying the ticket price, the flight and the hotel all by myrself just seemed to be too much given that there … Magento Imagine 2017 Las Vegas Recap weiterlesen
geschrieben von Fabian Schmengler
am 6. April 2017 - 9:11

With PHP 7 you can choose to write much more type-safe code than before, thanks to scalar type hints and return types.

function repeat(string $text, int $times) : string;

But what about arrays? There’s still only the generic “array” type hint, you cannot specify what’s in the array. For the IDE, you can add PhpDoc comments:

/** * @return User[] */ function allUsers() : array;

Now IDEs like PhpStorm can help with code completion for items in the returned array. But we cannot benefit from any checks at runtime, like with real type hints.

For arguments, there is a partial workaround, using variadic arguments. Take the following function

/** * @param User[] $users */ function deleteUsers(array $users);

With variadic arguments we can rewrite it to

function deleteUsers(User ...$users);

Usage also changes, to deleteUsers(...$users); In this call, the argument $users will be “unpacked” into single…

geschrieben von Fabian Schmengler
am 6. April 2017 - 9:11

Mit PHP 7 kann man sich dazu entscheiden, typsichereren Code zu schreiben als zuvor, dank skalaren Type Hints und Rückgabetypen.

function repeat(string $text, int $times) : string;

Aber was ist mit Arrays? Es gibt immer noch nur den generischen “array” Type Hint, man kann nicht spezifizieren was das Array enthält. Für die IDE kann man PhpDoc Kommentare hinzufügen:

/** * @return User[] */ function allUsers() : array;

Jetzt können IDEs wie PhpStorm mit Code-Vervollständigung für Elemente des zurückgegebenen Arrays helfen. Aber wir können nicht von Prüfungen zur Laufzeit profitieren, wie mit echten Type Hints.

Für Argumente gibt es einen partiellen Workaround mit variadischen Argumenten. Nehmen wir die folgende Funktion:

/** * @param User[] $users */ function deleteUsers(array $users);

Mit variadischen Argumenten können wir sie umschreiben zu:

function deleteUsers(User ...$users);

Die Benutzung ändert sich auch, zu…

geschrieben von Fabian Schmengler
am 4. April 2017 - 10:00
This is my weekly Kata post. Read the first one to learn what it is all about.

Last week: Ugly Trivia Game

To the Kata description
Scroll down to this weeks Kata description

As planned, I did the PHP version of this refactoring Kata over the week in multiple steps. First I needed test data for the “golden master”, the black box test

1. Step: Generate Test Data

The only input for the “Game runner” are random numbers (rand()), so I seeded the RNG with srand() to make them deterministic. Output is directly echo‘d, so I captured output with ob_start() and ob_get_clean().

Then I ran the program several times with different inputs (seed numbers), and created a data provider from the results.

2. Step: Output Stream

To get rid of the output buffering hack, I passed a stream resource…

geschrieben von Fabian Schmengler
am 4. April 2017 - 10:00
Dies ist mein wöchentlicher Kata Post. Lies den ersten um zu erfahren, worum es hier geht.

Heute nur auf Englisch

The post TDD Kata 13 – Boolean Expression Engine appeared first on schmengler-se.de.

geschrieben von
am 1. April 2017 - 20:40

Whether you’re using your IDE, a debugging extension, or calling get_class and new ReflectionClass yourself, PHP (or any language’s) ability to examine itself at runtime is a vital tool for debugging a program.

Most bugs come down to “this variable does not have what I thought it had in it”, or “the thing in this variable behaves differently than I thought it did”. Being able to dump out the contents of a variable exactly when the bug happens during program execution is the quickest way to get to the bottom of any problem.

If you’re a seasoned debugger, the virtual types in Magento'2 di.xml system might throw you for a loop. You define a virtual type like this

<virtualType name="pageConfigRenderPool" type="Magento\Framework\View\Layout\ReaderPool"> <arguments> <argument name="readers" xsi:type="array"…
geschrieben von
am 1. April 2017 - 19:12

We’ve just released pestle 1.3.1, the investable .0.1 release following 1.3.0. The release fixes a few bugs with the generated DDL code for text and decimal based columns. Full details available in the issue that reported the problem.

If you’re at today’s Magento Imagine hackathon (or any day’s hackathon really), and if your project needs a module or common module code, please give pestle a try. Besides getting you up and running with your boilerplate faster, real world use plus bug reports is the only thing that’s ever made software better.