Joining external attributes to entity in Magento 2
Recently I have written an article on how to include the custom field value to API response in case it is related to the same database table. In addition to the previous blog post, I would like to describe how to add external attributes to a collection, when the attribute values are stored in separate database tables.
How to add the details for cart item in Magento 2
In this blog post, I would like to share a pretty interesting and not obvious solution on how to join some additional details to cart item block on checkout cart page.
Let’s say we need to add the “Brand” custom product attribute and show its value within a specific block on the product view page and checkout cart page. It’s very simple in the scope of the product page, but how to deal with number cart items on checkout cart page. There are a couple of issues which you may face with. We will cover them further.
Adding an attribute programmatically in Magento 2
Upon creating an extension for Magento, quite often you face with a necessity to create a custom attribute for product, category, customer etc. Of course, you can add a description somewhere in the extension’s documentation how to do it and do not bother you head. However, all Magento versions allow you to create an attribute on the fly during an extension’s installation. There were many topics how to do that in Magento 1.x, and let’s check what is the difference in the next major version of Magento.
Removing needless product attribute values
Recently, we have faced with an issue that looked like a default Magento behavior. It turns out that Magento keeps the product attribute value even if the attribute was removed from the current attribute set. This brief article describes the issue’s details and a shell script on how to remove the old unnecessary attribute values from the database.
Adding custom product attribute to quote and order items in Magento
If you are developer, adding custom product attribute to quote and order items in Magento is pretty common task. And if you face with the same issue we will be very glad when you find this article helpful.
Adding new category attribute in Magento
In this article we would like to show you how to add a new custom category attribute in Magento 1. For doing this in Magento 2, read this post. Let’s say, this attribute is needed to display some content on the category page.
Restricting actions by a customer group in Magento
In this article I’d like to explain how to create multiselect product attribute which will allow to restrict actions depending on a customer group. This feature can be used to hide price of the product, disable product addition to cart or set other restrictions basing on a customer group.