How to add css class to specific rows base on fields in order commerce view page I would like to add a class based on the field value I used in commerce order view. I have tried a solution from here I have installed "devel" module and already enabled it. However, I cannot find the dpm() result from my admin order page. I don't know if it is because of my code or dpm() function.

Here is my code and put them in my theme's template.php file::

function MYTHEME_preprocess_views_view_list(&amp;$vars) {
    if ($vars['view']-&gt;name == 'commerce_backoffice_orders' &amp;&amp; $vars['view']-&gt;current_display == "Admin Page") {
        dpm($vars); //uncomment to see variables
        foreach($vars['view']-&gt;result as $key =&gt; $value){
             $timestamp = $value-&gt;node_created;
             if ($timestamp) { // add whatever conditional logic you need here
             $vars['classes_array'][$key] .= ' hello'; // note the space in front of class
             }
         }
     }
}


Here is a screenshot:



Does anyone have any idea about my issue? Thank you for anyone's help~~~~
Try this hook instead: MYTHEME_preprocess_views_view_table. Your view uses the Megarow table format. The hook you used is called for the list format.