Stopping the indexer process, its an easy task. When Magento starts indexing it updates the status in the table index_process to working. If script stopped working due to error or server problem, the status remains the same working and won’t bring the process back to pending automatically. One solution is log in to your database via PHPMyAdmin(or any…Continue Reading
Magento
Re-indexing Magento via command line
Re-indexing in Magento, such a huge process, so most people suggests to run it via command line instead of using browser. This could be a host problem, may be Magento timing out. However your catalog size increases its a pain to work with re-indexing. The Magento indexer file located in shell dir Checking status of…Continue Reading
Load product by id/sku in magento
Load product by id in Magento is very simple action And when we need to load the product by sku For the product collection in magento
Remove .html from category or product URL in Magento
Removing .html from Magento category URL or product URL is very eas to do. If you want to remove .html from category/product URL in Magento then Follow the below steps Go to System -> Config -> Catalog -> Search Engine Optimizations tab Delete “.html” from Category URL Suffix. Now you must do the indexing go…Continue Reading
Magento overriding/modifiying header/footer of the email templates
Modifying the email templates is an essential part of development in Magento. Especially when dealing with email templates. In latest Magento 1.9 there are some extra lines of code in email templates, for header and footer. If you want to tweak this without touching Magento core templates, this is right article to go through. First…Continue Reading
Disable the Magento Demo Store Notice
This is a demo store. Any orders placed through this store will not be honored or fulfilled. If you are seeing this message in your Magento store after installation, it means you have enabled the Magento demo store notice. Magento 1.9 it’s a default thing. This is recommended to turn on while developing an application,…Continue Reading
Multi conditions for addAttributeToFilter in Magento
addAttributeToFilter You may be wondering how to give multi conditions in Magento addAttributeToFilter function. See below for an example. It’s a bit tough why I’ve used this for, one custom attribute, same time needs to check the attribute value exists and if exists need to validate if that’s zero. so the final query will look…Continue Reading
How to fix integrity constraint violation when adding columns to sales order grid in Magento
When adding a new field in the sales order grid everything works well, but when you try to filter by date or some other field, you will get the below error message. Usually, it redirects to some other page and throws the Magento exception number screen, it’s horrible, isn’t it? There has been an error…Continue Reading
Magento API Steps to create web service in Magento V2
Creating the web services in Magento API V2, was a headache for me couple of days. It was a requirement for creating a custom API in magento 1.9 I have spent most of the time googling and going through the Magento’s source code very deeper. It was hard days for me really it was. Finally,…Continue Reading
How to get a Website Id using a Store Id?
Getting website Id by using the store Id And to get all store Ids under one website you can use the below code
Magento VAT (tax) rates not working correctly on displayed prices and also in admin
I’m working on a store and have already got prices on products. I have created all the price rules as per the Magento documentation. Next, I had set all the required settings for the Tax display, in System > Configuration > Sales > Tax. But when I adding the price its not showing the label…Continue Reading
Enable Template/Block Hints in Admin Panel in Magento
To enable the template path hints in Magento for admin side, there is no settings out of the box. we need to do it manually in a database. 1) Insert some records in core_config_data table Run below query in your database query browser This will enable the path hints in your applicaiton 2) To remove…Continue Reading
Get simple products belonging to configurable products in magento
While learning Magento development you may have encountered this functionality, to get simple products belonging to the configurable product.First of all, just decide this is a configurable product. Our next step is to get a product collection based on the current product. We’ll also say we want to get all attributes. Yea now we got all…Continue Reading
Magento notification system
While building your Magento module or tweaking the code you will need to handle the errors and notifications. Notice Success Error Warning (admin side only) Above methods, you can use in anywhere in Magento, like controller, model etc. Sample usage in controller
Magento Merged CSS Cache Clear Not Working
Merged CSS cache not clearing in Magento In production environment, everyone uses caching. Most of the Magento websites might be having this issue. When you make changes to CSS and you are using the magneto built in CSS merge functionality, you will be pulling your hair with browser cache. I have experienced the same with…Continue Reading
Changing the position of store switcher to header magento
Magento has a good amount of template overriding methods. As per the Magento documentation, we will follow the standard method. Instead of editing core files we will use local.xml located in our custom theme. Step 1 Adding the below line in to the header section of local.xml find in app/design/frontend/[your-package]/[your-theme]/layout/ After adding above code the…Continue Reading
Get the current website id in magento
To get the current running website id. All the Magento web developers may need to write this code while developing a Magento website in one way or another. Find instructions here to download Magento 2 and install.