Recalculate button

Hello,

Is there a way to change the background colour of the “recalculate totals” button in the admin panel? Or maybe have it automatically recalculate without needing the button?

Hello

In your addon you can overwrite this template and change the appearance of this button and optionally add some JS event

/design/backend/templates/views/order_management/components/totals.tpl

It’s hard to do anything else, or you can try changing the styles for the “btn” class, but this will then have an effect on all buttons that have this class.

Best regards
Robert

2 Likes

Thank you for your advice. I believe this is the button I need to modify, how would I add a background colour to just this? For example, with #E62626

 <tr class="hidden cm-om-totals-recalculate">
                <td colspan="2">
                    <button class="btn cm-ajax" type="submit" name="dispatch[order_management.update_totals]" value="Recalculate" data-ca-check-filter="#om_ajax_update_totals">{include_ext file="common/icon.tpl" class="icon-refresh"}{__("recalculate_totals")}</button>
                </td>
            </tr>

Please try

<button class="btn cm-ajax" type="submit" name="dispatch[order_management.update_totals]" value="Recalculate" data-ca-check-filter="#om_ajax_update_totals" style="background:#E62626">{include_ext file="common/icon.tpl" class="icon-refresh"}{__("recalculate_totals")}</button>

2 Likes

Thank you! That has worked

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.