Does anyone know how to change the colour of the status text in admin on the home admin page and in orders?
Shipped = Green
Pending = Red
Completed = Orange
any assistance will be greatly appreciated.
VIDAL CASSOON
Shipped = Green
Pending = Red
Completed = Orange
any assistance will be greatly appreciated.
VIDAL CASSOON
Last edited by jontycasson on Fri Feb 17, 2012 2:00 am, edited 1 time in total.
Hey,
You'd need to make changes in the following files:
admin/view/template/common/home.tpl
admin/view/template/sale/order_list.tpl
admin/view/template/sale/order_history.tpl
admin/view/template/sale/order_info.tpl
So I'd suggest making a backup of these files before proceeding.
Now, make the following modifications:
in admin/view/template/common/home.tpl
Find:
Replace With:
In admin/view/template/sale/order_list.tpl
Find:
Replace With:
in admin/view/template/sale/order_history.tpl
Find:
Replace With:
in admin/view/template/sale/order_info.tpl
Find:
Replace With:
That should do it. If you run into any problems, let me know.
Regards,
Joel.
You'd need to make changes in the following files:
admin/view/template/common/home.tpl
admin/view/template/sale/order_list.tpl
admin/view/template/sale/order_history.tpl
admin/view/template/sale/order_info.tpl
So I'd suggest making a backup of these files before proceeding.
Now, make the following modifications:
in admin/view/template/common/home.tpl
Find:
Code: Select all
<td class="left"><?php echo $order['status']; ?></td>
Code: Select all
<?php if ($order['status'] == "Shipped") { ?><td class="left"><font color="green"><?php echo $order['status']; ?></font></td>
<?php } elseif ($order['status'] == "Pending") { ?><td class="left"><font color="red"><?php echo $order['status']; ?></font></td>
<?php } elseif ($order['status'] == "Completed") { ?><td class="left"><font color="orange"><?php echo $order['status']; ?></font></td>
<?php } else { ?> <td class="left"><?php echo $order['status']; ?></td>
<?php } ?>
Find:
Code: Select all
<td class="left"><?php echo $order['status']; ?></td>
Code: Select all
<?php if ($order['status'] == "Shipped") { ?><td class="left"><font color="green"><?php echo $order['status']; ?></font></td>
<?php } elseif ($order['status'] == "Pending") { ?><td class="left"><font color="red"><?php echo $order['status']; ?></font></td>
<?php } elseif ($order['status'] == "Completed") { ?><td class="left"><font color="orange"><?php echo $order['status']; ?></font></td>
<?php } else { ?> <td class="left"><?php echo $order['status']; ?></td>
<?php } ?>
Find:
Code: Select all
<td class="left"><?php echo $history['status']; ?></td>
Code: Select all
<?php if ($history['status'] == "Shipped") { ?><td class="left"><font color="green"><?php echo $history['status']; ?></font></td>
<?php } elseif ($history['status'] == "Pending") { ?><td class="left"><font color="red"><?php echo $history['status']; ?></font></td>
<?php } elseif ($history['status'] == "Completed") { ?><td class="left"><font color="orange"><?php echo $history['status']; ?></font></td>
<?php } else { ?> <td class="left"><?php echo $history['status']; ?></td>
<?php } ?>
Find:
Code: Select all
<td id="order-status"><?php echo $order_status; ?></td>
Code: Select all
<?php if ($order_status == "Shipped") { ?><td class="left"><font color="green"><?php echo $order_status; ?></font></td>
<?php } elseif ($order_status == "Pending") { ?><td class="left"><font color="red"><?php echo $order_status; ?></font></td>
<?php } elseif ($order_status == "Completed") { ?><td class="left"><font color="orange"><?php echo $order_status; ?></font></td>
<?php } else { ?> <td class="left"><?php echo $order_status; ?></td>
<?php } ?>
That should do it. If you run into any problems, let me know.
Regards,
Joel.
Joel,
Thanks ever so much for sorting this!! looks much better already!
One issue... the 'Orange' complete status doesnt work... no colour change?
Thanks ever so much for sorting this!! looks much better already!
One issue... the 'Orange' complete status doesnt work... no colour change?
Great work on this Joel! Its working perfectly now!
do you know anything about this thread?
http://forum.opencart.com/viewtopic.php ... 15#p250715
do you know anything about this thread?
http://forum.opencart.com/viewtopic.php ... 15#p250715
Joel,
Thats brilliant thanks very much!!!!!
How about this now?
http://forum.opencart.com/viewtopic.php ... 14#p250714
Thats brilliant thanks very much!!!!!
How about this now?

http://forum.opencart.com/viewtopic.php ... 14#p250714
I'd like to do something like this based on shipping method - any ideas? Mainly if a customer chooses express, it will highlight the order in a different color.OpenCart Addons wrote:Hey,
You'd need to make changes in the following files:
admin/view/template/common/home.tpl
admin/view/template/sale/order_list.tpl
admin/view/template/sale/order_history.tpl
admin/view/template/sale/order_info.tpl
So I'd suggest making a backup of these files before proceeding.
.....
Regards,
Joel.
Thanks!
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
or switchOpenCart Addons wrote: in admin/view/template/common/home.tpl
Find:Replace With:Code: Select all
<td class="left"><?php echo $order['status']; ?></td>
Code: Select all
<?php if ($order['status'] == "Shipped") { ?><td class="left"><font color="green"><?php echo $order['status']; ?></font></td> <?php } elseif ($order['status'] == "Pending") { ?><td class="left"><font color="red"><?php echo $order['status']; ?></font></td> <?php } elseif ($order['status'] == "Completed") { ?><td class="left"><font color="orange"><?php echo $order['status']; ?></font></td> <?php } else { ?> <td class="left"><?php echo $order['status']; ?></td> <?php } ?>
Code: Select all
<?php
$status = $order['status'];
switch($status){
case "Shipped":
echo '<td class="left" style="background:#CF6">'.$status.'</td>';
break;
case "Pendente":
echo '<td class="left" style="background:#C0C">'.$status.'</td>';
break;
case "Completo":
echo '<td class="left" style="background:#FC0">'.$status.'</td>';
break;
}
?>
João Mello
Follow me João Mello
Facebook João Mello
Skype suporte.multiarts
Who is online
Users browsing this forum: No registered users and 8 guests