Working with the product table on templates

When you are generating documents such as quotes, invoices, goods-out notes and purchase orders you'll want to display a list of the products and charges included, along with the prices, quantities and the order total.

These details are added with a single widget, the table of products (_productTable_).

product table

Custom columns

You can customize the columns in the product table at the bottom of your template.

There are some standard options you can choose from depending on what sort of document the template represents, but you can also edit which columns appear, in what order they appear, and what they're titled. For example, you might want to change the language the column headers are in.

At the bottom of the template edit screen you'll find a drop-down menu titled "Choose columns for the _productTable_ widget" containing the list of pre-defined columns.

Selecting one of these will drop the detail into the field below - "Tweak your column setup" - where you can edit it.

custom columns

Using the "Tweak your column setup" field, you can tell Brightpearl what data to display and what the column heading is by writing the field name followed by the column heading, e.g. item_net,Item net.

Each column is separated with the pipe character (|). 

Here's an example:

qty,Qty|name,Item name|sku,SKU|item_net,Item net|row_net,Total net|item_gross,Item gross|row_gross,Total gross

This will display 9 columns, titled "Qty", "Item name" and so on.

Columns available are: qty, name, sku, ean, upc, isbn, price, discount, item_net, item_tax, item_gross, row_net, row_gross, row_tax, barcode, length, height, width, volume, weight, picked, packed, box, location

Product custom fields

You can also include any of your product custom fields in the product table. Each custom field is given a unique code which you can use, prefixed with PCF_. To include that information in your product table edit the custom columns to include the code, e.g. "PCF_YOURCODE".

Remember to specify what the column heading should be, in the format "PCF_YOURCODE,heading name".

Matrix printing on templates

If you're selling lots of items on an order, the result could be a long print out as each item has its own row.

There are a few options available to you to make this more readable, which can be set using the "Tweak your column setup" area.

Bring options up from under the item name into their own column

In the screenshot below you can see that "Shoe size" is a column, instead of the shoe size displaying beneath the product name.

Just add "option[Shoe size],Shoe size" to the custom columns field for that template to trigger this.

You can have as many option columns as you like.

Show a product group in matrix layout

In the screenshot below you can see that Shirts have both a "Size" and "Color". We've chosen this template to display the sizes in a grid format, so instead of having 4 rows for each color, you now just have one.

To trigger the matrix layout, add one custom column to your template. In this example, the code to add is: "matrix[Size],Header".

Note that the name you give this column doesn't show.

mceclip0.png

Combining option columns and matrix layouts

You can add both to your custom columns for any template.

Since a matrix can only show one option for any product, if you have products with more than one option (shirts have two: "Size" and "Color"), you can put one in the matrix and one as a column. The screen shot below shows how we've promoted "Color" into a column:

mceclip1.png

Things to be aware of

Matrix layout is not supported for packing notes, since one item must display per row for the quantity columns "shipped, on the order, to follow", and sometimes you need to display the location of the items, which usually varies per size or color.

You can however bring all your options into columns to reduce the length of the printout and print fewer pages.

If you try and make a complex matrix for a product set that causes layout conflicts, then the matrix won't show. For example, you can't put "Size" and "Color" into the matrix if an order contains a product that has both size and color.

If the different variants in a grouped (matrix) row have different prices, the system just displays a dash if your template has unit price columns (item_net, item_gross etc).

Styling the product table

It is possible to style the product table using CSS.

For example, this is some CSS taken from one of our sample templates which changes the font size of the product table headers and items to 10px:

product table fon size

The headers and rows can be styled individually and certain elements of the table can also be targeted.

Have more questions? Submit a request