1

I want to add color to order grid on magento2.4 admin panel, sales -> orders. Each status should have own color, forexample status "complete" shows purple and all rows who has complete status become purple

2 Answers 2

0

Please add custom js file in sales_order_index.xml file and to color completed order grid row as per the value,I have written below code in js file :

require(["jquery"], function($){

$(document).ready(function ()
{
    var i = setInterval(function ()
    {
        if ($('.data-grid-cell-content').length)
        {
            //clearInterval(i);
            $('.data-grid-cell-content').each(function(i, obj) {
                var classStatusName = $(this).text();
                if (classStatusName == "Complete")
                {
                    $(this).closest('tr').addClass("class-purple");
                }

            });
        }
    }, 100);
});
});
0

Install module: Magento 2 Grid Colors

Refer link to watch the youtube video.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.