Uni CPO 4 Documentation
  • Introduction
  • Why Uni CPO?
  • Installation
    • Upgrade
  • How To Use
    • Plugin's Settings
    • Builder
      • Data Structure
      • General Settings
      • Non Option Variable (NOV)
      • Weight Conditional Logic
      • Dimensions Settings
      • Image Conditional Logic
      • Formula Conditional Logic
      • Dynamic labels for options/suboptions
      • Shipping Classes Conditional Logic
      • Cart Discounts
    • Basic Modules
      • Row
      • Column
      • Paragraph
      • Button
      • Image
    • Options
      • Text Input
      • Text Area
      • Select
      • Radio Inputs
      • Checkbox Inputs
      • Date Picker
      • File Upload
      • Dynamic Notice
      • Range Slider
      • Matrix
      • Extra Cart Button
      • Google Map
      • Distance by Postcode
      • Font Preview
    • Fields Conditional Logic
    • Validation Conditional Logic
    • Colorify Feature
    • Imagify Feature
    • "Free Sample" Feature
    • Arithmetic Operators
    • Manage Order Items
    • Suboptions export/import
  • For developers
    • Actions & Filters
    • JS events
    • Extending Uni CPO
  • Duplicating options and products
  • How to debug
  • Affiliation
  • Themes & Plugins Compatibility
    • Popup Maker How To
    • Boxtal
    • Pitchprint.com
    • NBDesigner
    • Toggle Tax For Woocommerce
  • FAQ
  • Refund Policy
  • Managing licenses and billing info
    • License Utilization
  • Uni CPO Add-ons
    • Custom dynamic SKU (paid)
      • Stock management based on dynamic SKU
    • "Send Inquiry" (free)
    • Hidden/disabled option (free)
Powered by GitBook
On this page
  • Overview
  • Settings
  • Special Variables

Was this helpful?

  1. How To Use
  2. Options

Matrix

PreviousRange SliderNextExtra Cart Button

Last updated 5 years ago

Was this helpful?

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: | . 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!

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

2) numeric or words

3) numeric AND words

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