- Posts: 129
- Thank you received: 0
Change Order Row background color
10 years 3 weeks ago #249514
by nic7071
Change Order Row background color was created 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 .
-- 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.
10 years 3 weeks ago #249531
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Change Order Row background color
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,
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.
10 years 3 weeks ago #249673
by nic7071
Replied by nic7071 on topic Change Order Row background color
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
thanks
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.
10 years 3 weeks ago #249675
by nicolas
Replied by nicolas on topic Change Order Row background color
Hi,
Yes, it's in that file.
Something like that :
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.
10 years 3 weeks ago - 10 years 3 weeks ago #249773
by nic7071
Replied by nic7071 on topic Change Order Row background color
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
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 !
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.
10 years 3 weeks ago #249800
by nicolas
Replied by nicolas on topic Change Order Row background color
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.
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.
9 years 8 months ago #259211
by procajlok
Replied by procajlok on topic Change Order Row background color
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...
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.
9 years 8 months ago #259479
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Change Order Row background color
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,
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.
9 years 8 months ago #259501
by procajlok
Replied by procajlok on topic Change Order Row background color
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?
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.
9 years 8 months ago #259513
by nicolas
Replied by nicolas on topic Change Order Row background color
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.
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