Skip to main content

Change Order Row background color

More
10 years 3 weeks ago #249514 by nic7071
-- HikaShop version -- : 3.5.6
-- Joomla version -- : 3.5.1

hi,
i'd like to change each order row background color upon status changes
for example the background color of row of a confirmed order would be green
created would be yellow and etc .

Please Log in or Create an account to join the conversation.

More
10 years 3 weeks ago #249531 by Jerome
Hi,

You'll need to perform a view override to change the classname of the different rows ; and then thanks to some CSS you will be able to customize the background color.
www.hikashop.com/support/documentation/1...ize-the-display.html

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
10 years 3 weeks ago #249673 by nic7071
hello,
thanks but i was talking about the admin order list page .

i think i have to modify this file :
admin/component/hika/view/ order/tmpl/listing.php

i need an if condition code like
Code:
if status = confirm background red; else if status = shipped background blue and ...


thanks

Please Log in or Create an account to join the conversation.

More
10 years 3 weeks ago #249675 by nicolas
Hi,

Yes, it's in that file.
Something like that :
Code:
<?php if($row->order_status == 'confirmed'){ echo ' style="background-color: red !important;" '; }elseif($row->order_status == 'shipped'){ echo ' style="background-color: blue !important;" '; }else{ // .... }

Please Log in or Create an account to join the conversation.

More
10 years 3 weeks ago - 10 years 3 weeks ago #249773 by nic7071
hey, thanks i'm using this code to change the background of a complete row of and order.
check out this code on line 123 of admin/component/hika/view/ order/tmpl/listing.php
Code:
<?php if($row->order_status == 'created'){ echo ' style="background-color: #bafcff !important; border: 2px solid #62b7bb !important;" '; }elseif($row->order_status == 'confirmed'){ echo ' style="background-color: #bafcff !important; border: 2px solid #62b7bb !important;" '; }elseif($row->order_status == 'cancelled'){ echo ' style="background-color: #bafcff !important; border: 2px solid #62b7bb !important;" '; }elseif($row->order_status == 'refunded'){ echo ' style="background-color: #bafcff !important; border: 2px solid #62b7bb !important;" '; }elseif($row->order_status == 'shipped'){ echo ' style="background-color: #bafcff !important; border: 2px solid #62b7bb !important;" '; }elseif($row->order_status == 'delivered'){ echo ' style="background-color: #c5ff85 !important; border: 2px solid #6d9045 !important;" '; }else{ // .... }?>

the result is not what i'm looking for, i guess i have to some how define the order id that this row is about some where beside order_status
to seperate each row from outside and sync the background of the row and the order status inside !
Last edit: 10 years 3 weeks ago by nic7071.

Please Log in or Create an account to join the conversation.

More
10 years 3 weeks ago #249800 by nicolas
Hi,

You should be able to put that code directly into the tr opening tag of the table in that view file and it should work.

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #259211 by procajlok
Hello!
I paste the above code, and unfortunately it does not work at all. What am I doing wrong? :(
All configuration (in attachement) not work...

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #259479 by Jerome
Hi,

I'm afraid that you didn't page the right code and you did not page it in the right place.
Please be careful, PHP is case-sensitive for the variable names.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #259501 by procajlok
Hi :) Thx for answer..
I paste this code to "admin/component/hika/view/order/tmpl/listing.php". Where should I paste the code that worked correctly?

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #259513 by nicolas
Hi,

As I said in my previous message, you need that code in the tr tag there.
In your screenshots, I can see that you put the code either before the tr tag or after it, not inside it... like that:
<tr <?php ....PHP code.... ?>>
Also, you've used the variable name ORDER_STATUS. That's not valid. It should be order_status, as in the example I provided.

Please Log in or Create an account to join the conversation.

Time to create page: 0.197 seconds
Powered by Kunena Forum