How to Change Admin Sales Order Grid Row Color Base on COD payment method in Magento.

How To Change Admin Sales Order Grid Row Color Base on COD payment method in magento

Ecommerce payment methods are one of the important factors behind the success of stores. Even though there are various payment methods available online, but cash on delivery is still a hot favorite & trustable payment method compared to other available methods. According to a recent survey, 70 % of shoppers ate likely to use Cash on Delivery to prevent their self from online transnational frauds. Understanding customer convenience and providing better service is must to be ahead in online E-commerce competition. But everything doesn’t end up here when you store get thousands of orders every day it will become more difficult to identify that which orders are placed using Cash on Delivery Payment method.

So, we are back with an interesting trick that will help you to identify that which orders are placed using Cash on Delivery Payment method directly from the Sales Order Grid in Magento 2.

To do the same, first we need to override “Adminhtml_Sales_Order_Grid” file by creating new “config.xml” file.
In this file override Adminhtml_Sales_Order_Grid.
app\code\local\Vendor\Extension\etc\config.xml

    
        
            Vendor_Extension_Block
        
        
            
              Vendor_Extension _Block_Adminhtml_Sales_Order_Grid
            
        
    

Now we need to create one more file “grid.php” file at below location.
app\code\local\Vendor\Extension\Block\Adminhtml\Sales\Order\Grid.php


app\code\local\Vendor\Extension\Block\Adminhtml\Sales\Order\Renderer.php

‘; return $orderId; } else{ return $orderId; } } }

That’s it. Simply clear cache and you are done with coloring Cash on Delivery Payment method orders in Magento Sales Order Grid. You can even use or customize this code according to your need for colouing different grids with your specified condition. Also, you can track all admin action activities by installing Magento 2 Admin Actions Log Extension.
That’s it for today, Let us know if you are facing an issue while implementing using this code by commenting below.
Happy Coding!

Cash On Delivery Suite Magento 2

Previous Article

Top SEO tools to boost your Magento Store Rankings Rapidly

Next Article

How to Reduce cart abandonment by optimizing Magento 2 Shopping Cart Page

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Get Connect With Us

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨