Magento 2: Unlock Reindex Process via Command Line

Problem Sometimes a scenario comes when the indexing process gets locked at the time of reindexing. When the process or the index type is locked then you cannot reindex that particular locked index type. The reindex will always skip that index type. For example, let us assume that the Stock index type is locked. Then,…

Magento: Get Custom Options & Configurable Product’s Options on Shopping Cart

This article shows how you can get custom options values and configurable options values in shopping cart page in Magento 1.x. We use the checkout session quote collection for this purpose. Here’s the full code: // Get visible items collection in shopping cart $itemsCollection = Mage::getSingleton(‘checkout/session’) ->getQuote() ->getAllVisibleItems(); foreach ($itemsCollection as $item) { // Get…

Magento 2: Enabling/Viewing Full Error Display

In Magento 2.x, the full error display on frontend is disabled by default. This article shows different methods on how you can see the full error message in your Magento 2 website. I have written another article on how to Enable/View Full Error Display on Magento 1.x. This one is a similar article for Magento…

Magento 2: Admin Login Error – Your current session has been expired

Problem: – I did a new installation of Magento 2.2.5. – While installing it, I had disabled the third party modules installation. – The installation was successful. – Frontend opens fine. – Backend opens fine. – However, when I try to login to backend admin with the correct username and password, I get the following…

Magento 2: Forbidden You don’t have permission to access /magento2/ on this server. Server unable to read htaccess file, denying access to be safe

ow, when I browse http://127.0.0.1/magento2, I get the following error: Forbidden You don’t have permission to access /magento2/ on this server. Server unable to read htaccess file, denying access to be safe I checked the file permission and file ownership of all the files and folders inside the magento2 directory and everything seems to be…

Magento 2: Return JSON, XML, HTML & Raw Text Data Response from Controller

This article shows how you can return JSON data, XML data, HTML data, or Raw Text data from any Controller class in Magento 2. Generally, in the Magento2 controller’s execute() function, we see the redirect or forwarding call which redirects to the specified URL page. However, we might sometime need to return the JSON format…