Quantcast
Channel: Getting Started with Advanced Calculations Archives - Plugin Republic
Viewing all articles
Browse latest Browse all 4

Look up table with empty cells

$
0
0

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

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

look up table empty cells

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.

empty cell signifier

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’.

disable add to cart

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

The post Look up table with empty cells appeared first on Plugin Republic.


Viewing all articles
Browse latest Browse all 4

Trending Articles