Magento2: Fastest Way to Import / Update Product Prices in Bulk

Overview As you know our Magento1 version of the script “Updating product prices in Magento in an easier & faster way” was a massive hit. And we are back with the similar script for Magento 2 which helps you to update the product prices in bulk – probably the easiest and fastest way possible. Let’s …

Read moreMagento2: Fastest Way to Import / Update Product Prices in Bulk

Bash Script: Create MySQL Database & User with Optional Password

I have been using DigitalOcean for my personal projects. And one repeated things that I had to do is the creation of MySQL database & user. I know I could have used some CPanel like GUIs and even some of them came to my mind like VestaCP, Ajenti, ServerPilot, etc. But all come with sort …

Read moreBash Script: Create MySQL Database & User with Optional Password

How to set up multiple Magento 2 websites / stores with Nginx?

Magento is so flexible that one instance of it can have multiple websites/stores with different languages, domain names, categories, etc. You can configure the websites, stores, and store views in the Magento Admin. You use the MAGE_RUN_TYPE and MAGE_RUN_CODE variables in entry point scripts(index.php), .htaccess or Nginx configuration files(depending upon the web server you are …

Read moreHow to set up multiple Magento 2 websites / stores with Nginx?

Sandbox script for quick testing in Magento2

What’s your approach for quick & dirty testing in Magento2? Creating a test module with a controller and executing it from the browser to see the output? Creating a Console module and executing via CLI? Obviously, the above two approach takes time. Rather I would create a simple script (a single file) and put it …

Read moreSandbox script for quick testing in Magento2

Magento 2: How the quantity_and_stock_status attribute value is populated in product object?

Well, a new product attribute that you may notice in Magento2 is quantity_and_stock_status. SELECT * FROM eav_attribute WHERE attribute_code = ‘quantity_and_stock_status’; Query Result: If you load a product object as: $product = $this->_productRepository->getById($productId); var_dump($product->getData()); You will see the value of quantity_and_stock_status as an array of is_in_stock and qty. You must be thinking from where the …

Read moreMagento 2: How the quantity_and_stock_status attribute value is populated in product object?