Browsed by
Month: March 2017

Use EavSetup to Import Attributes

Use EavSetup to Import Attributes

I recently had the issue that I needed to use the \Magento\Eav\Setup\EavSetup outside the setup-context. To be a bit more concrete, I wanted to import attribute-sets, attributes and attribute-options without using an install-script. My first idea was in magento2 you can easily inject the ‘EavSetup’ via constructor injection and then use it in your own class First try So I injected into my class which worked out well in the development-mode. /** * SomeAttribute constructor. * * @param \Some\Own\AttributeContext $context *…

Read More Read More

Use Swagger to generate a full functional Magento API Client

Use Swagger to generate a full functional Magento API Client

Magento 2 comes with a nice swagger schema which describes the Webapi. The Magento guys were very clever to choose swagger. It not only comes with a schema, but moreover it is a complete interactive API client as well. A swagger schema is a JSON document to formalize the REST API. Formalized documents have the big advantage that you can process the data with a machine. One idea I had was to create a PHP API for the Magento 2 API. Fortunately the swagger…

Read More Read More

Nice to know: Install N98-Magerun via Composer

Nice to know: Install N98-Magerun via Composer

There is a so far merely undocumented installation procedure for Magerun that is extremely handy in project configurations. You just require Magerun within the Magento project and you can then execute it from the vendor’s bin folder: $ composer require n98/magerun2 […] $ ./vendor/bin/n98-magerun2 –version n98-magerun2 version 1.3.2 by netz98 GmbH Afterwards if you commit the composer.json  and composer.lock  files it is a take-away for the whole team. So it is regardless whether you’re running it locally, inside a docker…

Read More Read More

Introducing MageDeploy2

Introducing MageDeploy2

In our recent post series about Deploying Magento2 using Jenkins and deployer I was showing you how our Deployments are set up. In case you haven’t read them and are interested in the details here are the links: History and Overview of Magento2 Deployment Jenkins Build-Pipeline Setup (building assets, controlling the deployment) Releasing to Production (delivering code and assets, managing releases) Future Prospect (cloud deployment, artifacts) During the time of writing those articles I realized quite some improvements and generalizations that could be…

Read More Read More