When reviewing orders and invoices from an account that has parent/child customer relationships, users might want to quickly switch between these accounts.
That can be achieved my clicking on the bar visible at the top for these customers:
or from the customer's menu in the Switch button:
Some new customers might miss these areas or find them not intuitive enough.
You can help them by adding a more prominent button to the top of your lists like below.
To add this button, go to your Admin and open the menu Appearance / Theme Options.
Paste this snippet on your CSS Block
/* SWITCH ACCOUNT FROM THE ORDERS/INVOICES TABLES */
div#myOrdersListErp,
div#myOrdersList,
div#myAwaitApprovalsList,
div#myRewardsHistory,
div#invoiceHistory {
margin-top: 2.7em;
}
.switch-account-custom {
position: absolute;
top: 0;
right: 2em;
margin-left: 2px;
font-weight: bold;
padding: 5px 20px !important;
}
.invoice-history .switch-account-custom, .myawaitapproval .switch-account-custom {
right: 10px;
}
@media (max-width:767px) {
.switch-account-custom {
position: relative;
display: flex;
justify-content: center;
right: 0 !important;
}
}
/* SWITCH ACCOUNT FROM THE ORDERS/INVOICES TABLES */Paste this snippet on your Footer Block
<script>
/* SWITCH ACCOUNT FROM THE ORDERS/INVOICES TABLES */
$(document).ready(function () {
if ($('header .switch-account-header').length && $('body').hasClass('ex-loggedin')) {
$("<a class='switch-account-custom btn btn-xs btn-outlined' onclick=\"$('.switch-account-header a').click()\">Switch Account</a>").insertBefore(['div#myOrdersListErp','div#myOrdersList','div#myAwaitApprovalsList','div#myRewardsHistory','div#invoiceHistory']);
}
});
/* SWITCH ACCOUNT FROM THE ORDERS/INVOICES TABLES */
</script>Publish
And that is all, a Switch Account button should now be visible at the top of all your orders and invoices screens to easily switch between accounts π