![Unsuccess orders Unsuccess orders](https://image.opencart.com/cache/579204f3cc0e1-resize-710x380.jpg)
Different color type status can choose as follows.
xml open with a text editor.
admin / view / template / dashboard / recent.tpl
after
<tr class="<?php if($order['status']){ echo 'successfull'; } else { echo 'unsuccessfull'; }?>
add type status
<?php if($order['status'] == "pending"){ echo 'pending'; }?>
<?php if($order['status'] == "cancel"){ echo 'cancel'; }?>
--------------------- example-----------
<?php if($order['status'] == "xxxx1"){ echo 'xxxx1'; }?>
<?php if($order['status'] == "xxxx2"){ echo 'xxxx2'; }?>
<?php if($order['status'] == "xxxx3"){ echo 'xxxx3; }?>
<?php if($order['status'] == "xxxx4"){ echo 'xxxx4'; }?>
------- end example --------
so as type staus have orders. Once you have finished adding ended with
">
]]></add>
Repeat the same for admin / view / template / sale / order_list.tpl
<tr class="<?php if($order['order_status']){ echo 'successfull'; } else { echo 'unsuccessfull'; } ?>
<?php if($order['order_status'] == "pending"){ echo 'pending'; }?>
<?php if($order['order_status'] == "cancel"){ echo 'cancel'; }?>">
]]></add>
--------------------- example-----------
<?php if($order['order_status'] == "xxxx1"){ echo 'xxxx1'; }?>
<?php if($order['order_status'] == "xxxx2"){ echo 'xxxx2'; }?>
<?php if($order['order_status'] == "xxxx3"){ echo 'xxxx3; }?>
<?php if($order['order_status'] == "xxxx4"){ echo 'xxxx4'; }?>
------- end example --------
Finally, we conclude with the style of display
admin / view / template / common / header.tpl
----------------- --------- Original file
<add><![CDATA[<style>.successfull td{color:green;font-weight:bold} .unsuccessfull td{color:red}</style>]]></add>
-------------------------------------------------- -------------
We modify it to add color to the status of orders
<add><![CDATA[<style>.successfull td{color:green;font-weight:bold} .unsuccessfull td{color:red} .pending td{color:orange} .cancel td{color:blue} .xxxx1 td{color:You color} .xxxx2 td{color:You color} .xxxx3 td{color:You color} .xxxx4 td{color:You color}</style>]]></add>
Login and write down your comment.
Login my OpenCart Account