i want color of status fill in background color in prestashop default rma. see image.
i tried find correct tpl file without success. code status color found on orders page, think work here also.
{if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if}
prestashop 1.5.3.1
first have create new method in orderreturnstat class. i'll guide reach objective.
create new file name orderreturnstate.php
in prestashop/override/classes/order/
:
class orderreturnstate extends orderreturn { public static function getorderstatecolor($id_order_return_state) { return db::getinstance(_ps_use_sql_slave_)->getvalue('select color `'._db_prefix_.'order_return_state` id_order_return_state = '.(int)$id_order_return_state.''); } }
after of have create file, don't paste here because long, copy , paste file
prestashop/youradminfolder/themes/default/template/helpers/list/list_content.tpl
in
prestashop/youradminfolder/themes/default/template/controllers/return/helpers/list/
now change posted code in this
{if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{elseif $statecolor = orderreturnstate::getorderstatecolor($tr.state)}style="background-color: {$statecolor}"{/if}
after of operations delete file prestashop/cache/class_index.php
now rows background color of return state.
Comments
Post a Comment