# 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:

![](/files/-M50Y8o2sY0J21TCabyu)

## Settings

These are:

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

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

![](/files/-M50Y8o4KSc_Pr2MoAUw)

First, add values for columns. They must be separated by this sign: `|` . Next, do the same for rows. Next click on *Generate* button and a table will be generated where you can add values for each cell. **Only numeric values can be added to cells!**&#x20;

**As for values for rows and columns, they can be either words or numeric. Or even both!** These screenshots shows the proper syntax:

1\) numeric values

![](/files/-M50Y8o6iuKmQphX6Aqn)

2\) numeric or words

![](/files/-M50Y8o8s63ZFjRhZ4Mr)

3\) numeric AND words

![](/files/-M50Y8oA73zMPXd9HlG3)

In this case a special syntax is used. You have to split option values by `|` and split a value for a formula and a value for displaying by `:` (space;colon;space). **Again, as it is very important, use colon (**`:`**) surrounded by spaces from both sides!**

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

```
{option_slug_col}
```

It holds a value of the chosen column

```
{option_slug_row}
```

It holds a value of the chosen row


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.moomoo.agency/uni-cpo-4-documentation/usage/options/matrix.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
