add Global PHP code field to Views on condition I want to add PHP field to View based on condition that certain logic field in content item is checked. How can I check that it is checked in PHP code?

More concisely: how can I check if some product's field is checked in Views?   

The View is just showing list of contents
I think you have not followed a correct way, these are the steps to create a custom field on the basis of value of an existing text field are :


Add a field in any content type on basis of whose value you want to
display a custom field.
Add contents of that content type filling value of newly created
field say its a checkbox having 0 or 1 as its value.
Create a view of that content type.
Add fields and a custom field having some value, say ;

&lt;?php 
echo 'Astha Chauhan';
?&gt;


in output code field. 


Then add a filter of type Global:PHP and add a filter code
accordingly:

  &lt;?php    
      if ( $row-&gt;field_test_field == '2') {
       return $row-&gt;php; 
      }
      else { 
       return 'null'; 
      }  
   ?&gt;