Categories
Tutorials

Using Magento 2 Flag Models

To save a few bits of data you don’t have to create a specialized entity each time. Magento 2, just like its predecessor Magento 1, offers Flag models. Flag models implement a small key-value store inside the Magento database.

In Magento 1 you could use the Flag model directly. For Magento 2, we have to create a class that extends the framework Flag class so we are able to set the correct FlagCode.

Categories
Tutorials

Duplicate Content-Type header on Magento 1 API responses

Getting HTTP 500 errors with the message “duplicate header ‘Content-Type'” when using Magento 1 XmlRpc API? Here is how to fix them.

Beside the traditional way of using scripts to control Magento (for importers or fulfillment interfaces), you can also do so using Magento’s API. When using the XmlRpc API, you might get a surprise – depending on your web server configuration.