Uni CPO 4 Documentation

Searchâ€¦

Uni CPO Add-ons

Matrix

Overview

Matrix Option is quite interesting and a bit unusual one. It adds a possibility to create a table of discrete values which can be chosen and used in product price calculation formula.

This is how the table looks like:

Settings

These are:

- values in columns
- values in rows
- template
- actual matrix table

This is how Matrix Option table's values are added:

First, add values for columns. They must be separated by this sign: *Generate* button and a table will be generated where you can add values for each cell. **Only numeric values can be added to cells! **

`|`

. Next, do the same for rows. Next click on 1) numeric values

2) numeric or words

3) numeric AND words

In this case a special syntax is used. You have to split option values by **Again, as it is very important, use colon (****) surrounded by spaces from both sides!**

`|`

and split a value for a formula and a value for displaying by `:`

(space;colon;space). `:`

Why we need to split a value for a formula at all? Well, it is quite handy if you want to display a word or two as displaying name in the table, but still be able to use some numeric value in the formula. In case of choosing a cell within a column with the name like this

`100 : One Hundred`

"100" will be set to a special var of this option and "One Hundred" will be just displayed in the table and cart/order meta.We reviewed columns and rows values. So, what about the third setting called "template"? This setting is used for mastering a template which will be shown as this option value in cart/order meta. You can use two *special template variables* here:

`{{{row}}}`

and `{{{col}}}`

.Special Variables

1

{option_slug_col}

Copied!

It holds a value of the chosen column

1

{option_slug_row}

Copied!

It holds a value of the chosen row

Last modified 2yr ago

Copy link