Fixing the MySQL Error “Numeric value out of range: 167 Out of range value for column ‘value_id’ at row 1” in Magento 2

Are you encountering the frustrating MySQL error "Numeric value out of range: 167 Out of range value for column 'value_id' at row 1" when you try to run your Magento 2 store? If so, you're not alone. This error, stemming from a limitation in MySQL InnoDB database tables with an auto-increment column defined as int, …

Continue reading Fixing the MySQL Error “Numeric value out of range: 167 Out of range value for column ‘value_id’ at row 1” in Magento 2

“Use Default Value” for Multi Select Attributes Doesn’t Save for Store Scope View in Magento 2 Commerce (Enterprise) Edition

A few days ago I worked on a very interesting issue for a client in Magento 2 Commerce Edition. Basically, they have some multi-select product attributes and these attributes allow the admin user to add different values depending on the Store View because when these attributes were created, they were set to Store View in …

Continue reading “Use Default Value” for Multi Select Attributes Doesn’t Save for Store Scope View in Magento 2 Commerce (Enterprise) Edition

How to fix “Text fields are not optimized for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default.” in Magento 2

A few days ago, I came across an issue in a Magento 2 project where the client complained that no products were being displayed when a customer searched for anything on the site. The most curious part is that this only happened in their production environment. Everything was working fine in their staging environment, which …

Continue reading How to fix “Text fields are not optimized for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default.” in Magento 2

A Comprehensive Guide to Installing and Enabling Magento 2 Multi-Source Inventory (MSI)

As an experienced Magento 2 senior developer, I understand the significance of efficient inventory management for an e-commerce store. One powerful tool that Magento 2 offers is the Multi-Source Inventory (MSI) feature. MSI allows you to manage and track inventory across multiple physical locations or warehouses seamlessly. In this blog post, we will delve into the step-by-step process of installing and enabling the Magento 2 Multi-Source Inventory packages.

A Comprehensive Guide to Magento 2 MSI (Multi-Source Inventory)

In the ever-evolving world of e-commerce, inventory management plays a critical role in ensuring a seamless customer experience. For Magento 2 developers, and merchants, the introduction of Multi-Source Inventory (MSI) has revolutionized the way inventory is handled. I had the opportunity to work with MSI recently and I found it pretty interesting so I decided to write about it and share my understanding with anyone who may be interested in learning more about it. In this blog post, we will explore the fundamentals of Magento 2 MSI, its purpose, and its significant benefits for businesses. Also, I'll give you an example to illustrate how it works currently.

Usando o Shell Script do Magento

Usando o Shell Script do Magento para Importar Opções de Atributos por Arquivos CSV

Olá pessoal, Estes dias me deparei com uma tarefa simples, porém bem corriqueira para quem trabalha com atributos que possuam muitas opções no Magento. O que eu precisava era basicamente importar em torno de 1.500 novas opções de um atributos específico que vou denominar aqui como atributos marcas. Com isto em mente logo pensei se …

Continue reading Usando o Shell Script do Magento para Importar Opções de Atributos por Arquivos CSV

Como Formatar Números como Moeda ou Preço no Magento

Ás vezes precisamos fazer a formatação de um valor, por exemplo 99.9900 para valor monetário como R$99,99. Para fazer esta conversão é simples, podemos utilizar um método do helper do próprio Magento chamado currency: [php] $amount = 99.9900; $price = Mage::helper('core')->currency($amount, true, false); [/php] O resultado desta conversão será R$99.99. Se analisarmos o método estático …

Continue reading Como Formatar Números como Moeda ou Preço no Magento

Como Pegar a URL de uma Categoria no Magento

Em alguns casos nós precisamos obter algumas informações sobre as categorias no Magento. Suponhamos que precisemos obter a url de uma determinada categoria. Abaixo mostro como você poderia faze-lo via código: [php] $model = Mage::getModel('catalog/category'); $_category = $model->load($categoryid); // Uma forma alternativa: $_category = Mage::getModel('catalog/product')->load($categoryid); echo $_category->getUrl(); [/php] Este código lhe retornará a url da …

Continue reading Como Pegar a URL de uma Categoria no Magento

Como Saber se a Página Atual é a de uma Categoria no Magento

Existem momentos em que nós desenvolvedores Magento precisamos fazer com que o Magento se comporte de uma forma diferente em uma determinada página e vamos supor que esta determinada página é a página de uma categoria de produtos, aonde aparece o grid de produtos de uma determinada categoria. Para saber isso via programação é simples: …

Continue reading Como Saber se a Página Atual é a de uma Categoria no Magento