Post by jontycasson » Tue Feb 07, 2012 4:47 am

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
Last edited by jontycasson on Fri Feb 17, 2012 2:00 am, edited 1 time in total.

Image
Vidal Cassoon - Hair and Beauty Specialists


New member

Posts

Joined
Wed Apr 13, 2011 2:01 am
Location - Cheshire

Post by OpenCart Addons » Fri Feb 10, 2012 9:37 am

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:

Code: Select all

<td class="left"><?php echo $order['status']; ?></td>
Replace With:

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 } ?>
In admin/view/template/sale/order_list.tpl
Find:

Code: Select all

<td class="left"><?php echo $order['status']; ?></td>
Replace With:

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 } ?>
in admin/view/template/sale/order_history.tpl
Find:

Code: Select all

<td class="left"><?php echo $history['status']; ?></td>
Replace With:

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 } ?>
in admin/view/template/sale/order_info.tpl
Find:

Code: Select all

<td id="order-status"><?php echo $order_status; ?></td>
Replace With:

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.

Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada

Post by jontycasson » Tue Feb 14, 2012 3:55 am

Joel,

Thanks ever so much for sorting this!! looks much better already!

One issue... the 'Orange' complete status doesnt work... no colour change?

Image
Vidal Cassoon - Hair and Beauty Specialists


New member

Posts

Joined
Wed Apr 13, 2011 2:01 am
Location - Cheshire

Post by OpenCart Addons » Tue Feb 14, 2012 11:41 am

If the status title is "Complete", change everywhere I wrote "Completed" in the above changes to "Complete".


Regards,
Joel.

Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada

Post by jontycasson » Sat Feb 18, 2012 7:35 am

Great work on this Joel! Its working perfectly now!

do you know anything about this thread?

http://forum.opencart.com/viewtopic.php ... 15#p250715

Image
Vidal Cassoon - Hair and Beauty Specialists


New member

Posts

Joined
Wed Apr 13, 2011 2:01 am
Location - Cheshire

Post by OpenCart Addons » Wed Feb 22, 2012 4:30 am

Hey,

I left you a reply in your other thread.

Regards,
Joel.

Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada

Post by jontycasson » Thu Feb 23, 2012 4:57 am

Joel,

Thats brilliant thanks very much!!!!!


How about this now? :laugh:

http://forum.opencart.com/viewtopic.php ... 14#p250714

Image
Vidal Cassoon - Hair and Beauty Specialists


New member

Posts

Joined
Wed Apr 13, 2011 2:01 am
Location - Cheshire

Post by OpenCart Addons » Thu Feb 23, 2012 11:58 am

See the other post for a reply. :)


Joel.

Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada

Post by Ellis13 » Thu Feb 23, 2012 2:33 pm

ImageWhy are you see another

Newbie

Posts

Joined
Wed Feb 22, 2012 2:34 pm

Post by OpenCart Addons » Thu Feb 23, 2012 10:30 pm

Hey Ellis,

I posted a reply to the other topic.

The solution to this topic is above.


Regards,
Joel.

Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada

Post by labeshops » Thu Sep 27, 2012 11:43 pm

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.
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.

Thanks!

Running Opencart v3.0.3.2 with multi-stores from https://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by clapiana » Fri Jan 04, 2013 7:46 am

awesome work on the highlight of order status. thank you!

is there a vmod for this? any reason it wouldnt work with a vmod?

New member

Posts

Joined
Thu Sep 01, 2011 6:22 pm

Post by moscoiso » Wed Mar 06, 2013 1:37 am

OpenCart Addons wrote: in admin/view/template/common/home.tpl
Find:

Code: Select all

<td class="left"><?php echo $order['status']; ?></td>
Replace With:

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 } ?>
or switch

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
Image Image
Image


Newbie

Posts

Joined
Tue Jul 24, 2012 11:58 am
Who is online

Users browsing this forum: No registered users and 15 guests