Jump to content

[SOLVED]: Make order in orders list inherit status color?


Recommended Posts

The default view in orders list in 1.6 is very... blending in. I would like to alter the admin theme in a way that instead of order status color would show on the whole line instead of just in status row. Is there a way to do this?

I've tried looking for color variables in these files but no luck:

{main_dir}\controllers\admin\AdminOrdersController.php

{main_dir}\admin\themes\default\template\controllers\orders\helpers\view\view.tpl

Edited by sting5 (see edit history)
Link to comment
Share on other sites

Seems I've found the file that is responsible for alterations of the listing orders - list_content.tpl.

I've found that {main_dir}\themes\default\template\helpers\list\list_content.tpl is the full path to the file. And I've changed this part of the code:

{foreach $list AS $index => $tr}
    <tr{if $position_identifier} id="tr_{$position_group_identifier}_{$tr.$identifier}_{if isset($tr.position['position'])}{$tr.position['position']}{else}0{/if}"{/if} class="{if isset($tr.class)}{$tr.class}{/if} {if $tr@iteration is odd by 1}odd{/if}"{if isset($tr.color) && $color_on_bg} style="background-color: {$tr.color}"{/if} >

To this code line:

{foreach $list AS $index => $tr}
    <tr{if $position_identifier} id="tr_{$position_group_identifier}_{$tr.$identifier}_{if isset($tr.position['position'])}{$tr.position['position']}{else}0{/if}"{/if} class="{if isset($tr.class)}{$tr.class}{/if} {if $tr@iteration is odd by 1}odd{/if}"{if isset($params.color) && isset($tr[$params.color])} style="background-color:{$tr[$params.color]};color:{if Tools::getBrightness($tr[$params.color]) < 128}white{else}#383838{/if}"{/if}

But the output of the change in this file gives empty "background-color:" property, seems that the coding does not know what $tr[$params.color] is and does not take the status color parameter, but it's strange because the code is used few rows after to color the status cell.

I would really appreciate the help, because this would greatly help my employees not to mix up or miss orders.

Link to comment
Share on other sites

Ok, so the fix is easy (that I've found in other thread) - all You need to do is go and edit this fie:
 
 find this line:

    /** @var bool */
    protected $colorOnBackground;

and add the "true" value to it:

    /** @var bool */
    protected $colorOnBackground = true;
 

 
 
Those editing 1.6 Prestashop versions, for the changes to take effect, You need to find this file:
{main_dir}\admin\themes\default\css\admin-theme.css
 
and comment out these lines (kill preset background-color parameters):

.bootstrap .table tbody>tr>td{border-top:none;color:#666;/*background-color:#fff;*/padding:3px 7px;vertical-align:middle;word-wrap:nowrap;font-size:12px;border-bottom:solid 1px #EAEDEF}/*.bootstrap .table tbody>tr.odd>td{background-color:#FCFDFE}*/
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...