Skip to main content
Skip table of contents

Account Dashboard: Add a row

Purpose and scope

To demonstrate how you can customize your account dashboard using the Templates Editor.

Watch

More information

The Account Dashboard contains several data elements, such as your customer's company name, contact name, and account details.

This use case demonstrates how to add a row to the Account Dashboard and populate it with available variables and translations.

Once you have saved your changes in WebShop, they are immediately visible in WebShop to your customers.

Key points

  • If you are comfortable with HTML, CSS, and variables, you’ll be in a good place to use this feature to achieve a personalized look and feel for your WebShop.

  • You are responsible for ensuring that the code you have written doesn’t adversely affect your WebShop.

Recipe

To display the customer code and customer name on different rows, as shown:

CustomizeTemplate-MoveElements-BeforeAndAfter.png
  1. Open Templates in the Management Interface. This opens the Templates Editor.

  2. Navigate to Templates->Dashboard and select “dashboard-main.twig”. This opens the existing twig code under the EDITOR tab.

  3. Add and modify Twig code to add an additional row to the Account Dashboard table and populate each row with the correct variable.

  4. Select Save to save your changes.

Twig code to separate variables onto two rows in the Account Dashboard

From (existing code)

<tr>

<td><strong>{{ translation('customer.dashboard.name') }}</strong></td>

<td>

{{ (features.dashboard_show_account_code) ? (customer.Code ~ ' - ') : '' }} {{ service_call('name') }}

</td>

</tr>

To

<tr>

<td><strong>{{ translation('customer.dashboard.name') }}</strong></td>

<td> {{ service_call('name') }} </td>

</tr>

<tr>

<td>

<strong>{{ translation('customer.dashboard.accountCode') }}</strong></td>

{{ (features.dashboard_show_account_code) ? (customer.Code) : '' }}

</td>

</tr>

Remember

  • You may have to select Clear Cache (ClearCacheIcon.png) in the top menu of the Management Interface before your changes are visible.

  • Select the DOCUMENTATION tab to view what objects and variables you can manipulate.

  • Select the LAYOUT tab to see where your twig code is displayed in WebShop.

Related content

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.