1. Home
  2. Knowledge Base
  3. Advanced Calculations for Add-Ons Ultimate
  4. Look up table with empty cells
  1. Home
  2. Knowledge Base
  3. Getting Started with Advanced Calculations
  4. Look up table with empty cells

Look up table with empty cells

This article refers to the Advanced Calculations extension for Add-Ons Ultimate.

Let’s say you’re using a price table like this:

Not all the possible combinations have a value. For example, if the user enters 220 in the x-axis field and 240 in the y-axis field, there’s no price to be returned.

Instead, you can just enter a star * in the field. Advanced Calculations will return a 0 value for this as the result of the look up. You can then use this 0 value to set conditions on other fields – e.g. to display a notification.

Change the empty result text

This is what the user will see as the result of the calculation field when the look up table returns an empty field. By default, it’s set to display a * but you can change it to any text.

To do this, go to WooCommerce > Settings > Product Add-Ons > Calculations and change the value in the ‘Empty cell signifier’ field.

Disabling the add to cart button

As an extra option, you can elect to disable the add to cart button if the look up table returns an empty value.

To do this, go to WooCommerce > Settings > Product Add-Ons > Calculations and check the option to ‘Disable Add to Cart button’.

If you don’t see these settings, please ensure you have the Advanced Calculations extension installed and active.

Was this article helpful?

Related Articles