Browsed by
Category: Magento 2

Workaround for Magento 2 Issue #5418 – Product Grid does not work after Import

Workaround for Magento 2 Issue #5418 – Product Grid does not work after Import

The Magento 2 Importer is a simple way to import and update Product Data and many more. Since July 2016, an Import will throw an Exception at the Product Grid. Today, I added a small script as a Workaround, which I want to share. It is actually simple and based on the Yonn-Trimoreau‘s SQL Query. I setup a bashscript, which enters the working dir and executes the query via n98-magerun2. After that, I added a CronJob to call the Script every…

Read More Read More

Deploying Magento2 – Jenkins Build-Pipeline [2/4]

Deploying Magento2 – Jenkins Build-Pipeline [2/4]

This post is part of series: 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) Recap In the post Deploying Magento2 & History / Overview [1/4] we showed an overview of our deployment for Magento2 and this post will go into more detail on what is happing on the Build-Server and how it is done. So to get you up to speed, this is…

Read More Read More

Deploying Magento2 – History & Overview [1/4]

Deploying Magento2 – History & Overview [1/4]

Quite recently we have updated the deployment of our Magento2 projects to a more flexible and reusable way. Originally I wanted to create one post to present you our deployment setup, the systems involved, the workflow & process and some code that might be interesting. While describing this subject I decided to create a series of posts to cover those parts as it was just getting to extensive for one post. I am planing to cover the following topics in separate posts: History and…

Read More Read More

How to add alternative HTTP headers to Magento 2?

How to add alternative HTTP headers to Magento 2?

If you have more than one frontend server running in your business, it’s needed to load balance the traffic between the nodes. In this case we have a new instance between the browser and the web-server. Often it’s a system like HAProxy or Varnish. If the load balancer or proxy receives a request from a browser, it forwards it to backend server in the internal network. The IP address of the client is than added to a forward header which contains…

Read More Read More

How to Create a Category Image Attribute in Magento 2

How to Create a Category Image Attribute in Magento 2

Creating a custom Category Attribute with an image upload is quite common feature requirement in our shops. So this blog-post will be about the steps you have to take to create a custom category attribute with an image upload in Magento 2. The post turned out to be quite long, but I wanted to provide a complete description of all steps necessary. So stay with us if your interested 🙂 Our Module is called Dev98_CategoryAttributes and the image attribute will be called…

Read More Read More

How to create attribute-options in Magento2

How to create attribute-options in Magento2

Recently we had to create Configurable Products in our Product Import. To create those products we had to make sure that all simple products are generated before the configurable products and that all the attribute options for our configurable attribute are available. So this post will focus on how to create those attribute options and a problem where we had to spend some time figuring out. Preface We need to create those attribute options before we call $this->magentoImporter->validateSource($dataSource); otherwise the…

Read More Read More

How to adjust increment-ids in Magento 2

How to adjust increment-ids in Magento 2

Maybe almost every Magento developer has had the task to customize the increment-ids for orders or customers in Magento. Recap Magento 1 In Magento 1 you had to change the column increment_prefix  in the table eav_entity_store . I am sure there are modules out there that let you achieve that in convenient way. We have done that by using Setup-scripts most of the time. When a new store is created you need set the increment_prefix afterwards and do so for all entities that you…

Read More Read More

Creating Configurable Products

Creating Configurable Products

Basically there are different ways for creating Configurable Products in Magento2 (like in Magento1). You can create it using the Admin Panel, using a Setup\InstallData or Setup\UpgradeData class or during a custom import. ADDING THE ATTRIBUTE Let’s assume we are creating our attribute using the Setup\UpgradeData class in our module. The code we might initially create could look something like the following:

The above code will create an attribute with the attribute-code ‘dev98_diameter’, which is available for simple and configurable products, within…

Read More Read More

Thoughts about custom attributes and the way to manage them!

Thoughts about custom attributes and the way to manage them!

To add or update an EAV attribute in Magento, it is necessary to add setup scripts to your code base. If you don’t handle your custom attributes in setup scripts, you are not able to install your project from scratch, which could cause a lot of problems. For example, it makes it harder to run unit- and integration tests. So lets assume that we are working in a team with 4 developers and everybody has a different task. Each task…

Read More Read More

Array does not exist in webapi

Array does not exist in webapi

The Magento 2 webapi is very useful to publish entities to the world. One big advantages of the new webapi is the automatic generation of a swagger schema for RESTful API. If you prefer SOAP over REST you should also be happy to heat that Magento 2 will automatically generate all the WSDL stuff. Magento 2 analyses all the published classes/methods via PHP reflection. Any generated WSDL file contains a XSD with all the types used in the webservices. In…

Read More Read More