Knowledge Base

Hi, How can we help?

Pricing & Custom Formula

Every input field provides an option to enable pricing. First, you need to tick the ‘Enable Price‘ checkbox in the pricing tab of the field. Then the window will expand and show the options in pricing.

Pricing Type

The pricing type has five varieties of pricing options.

  • Fixed pricing
  • Per Character pricing
  • Multiply By Value
  • Percentage Of Product Price
  • Custom Formula

1. Fixed pricing

The value will be fixed as configured and will be added up with the product price if the field is not empty. 

Example 1: Fixed pricing same for all options

Back-end:

Frond-end:

Example 2: Different prices for all options

Back-end

Frond-end:

2. Per Character pricing

Price will be calculated per character that customers fill for the field. Admin can configure the price per character value in the provided field, and it will count as the customer enters each character.

You can exclude the counting of the characters using a regular expression.

Back-end:

Frond-end

3. Multiple by value

Price can be configured as a product of customer entered number,  It will multiply the number filled by the customer with the value set.

 Example 1: In this example, the price will be the same for all options

Back-end:

Example 2: Here we are showing you an example of different prices for each option. In this, you have to enter prices for each option in the respective columns. 

Back-end:

Frond-end:

4. Percentage of Product Price

Price can be configured as a percentage value of the product base price. It will calculate the options price as per the percentage you are giving.

Back-end:

Frond-end:

5. Custom Formula

Price can be set using custom formula, where admin can configure any mathematical operations that supported by Javascript and PHP , as well it supports ternary conditional operations.

While configuring the formula, it can use some predefined keywords in formula which will be quoted using { and }.  And also can refer other fields by using field element_ID.

Below are the list of predefined variables

{value}: Value entered by custom on the form.

{quantity}: Product quantity chosen by customer.

{product_price}: Product base price.

{unixDays}: To find the number of days.

{this.count}: To find the count of options that the user selected.

{value.length}: To find the length of the string entered in a field.

Referring other fields price and value

{field.element_id_of_the_field.price}: which used to refer price of other fields in a formula.

{field.element_id_of_the_field.value}: which using to refer value of other field in a formula.

 1. Set price based on the value percentage 

{value}*10/100

2. Set price if the value is greater than 2. Here we utilize javascript/php ternary operator

({value}>2)?{value}*10:0

Here it checks if the value entered is greater than 2, and if yes, it multiply value by 10, else it will set price as 0.

3. Set price based on quantity customer choose

(100/{quantity })*{value}

Here by increasing the quantity, the price can be reduced.

4. Set price based on other field value 

{field.wcpa-radio-group-1548937046157.value}*{value}

Here it refers to the value of another radio field and using it in a formula. It multiplies the value of the radio field with the value of user input for the text/number field.

wcpa-radio-group-3590011506 is the element id of radio field, You can check below screenshot where it marked how we can get an element ID.

5. Setting Multiple Conditions

You can add multiple conditions for the same option price using the ternary operator. For example,

Suppose you have a product and it has a varying options price per number of options varies. One example condition is given below.

  • 1-100 -> {value}*100
  • 101-200 -> {value}*80
  • >200 ->{value}*60   

Frond-end:

Setting formula builder

 You can use Formula Builder to create custom formulas, this helps us to reduce the complexity of the custom formula. To use a form builder go to Form edit<<formula builder

Back-end:

Frond-end:

Setting Price as Fee

You can set a price as a fee by ticking the following option. Its effect is that the option price will be added only once even when you select a product more than once. That is the price that is set to be fee will be calculated only once per order irrespective of quantity.

Back-end:

Front-end:

Price Settings(Local)

Total Price

Product Price + Addon Price: Will display the total price as the sum of the product price and addon price – This will be the default option.

Take which ever is maximum of addon price and product price: will only select one price either the Option price or Base price which is higher.

Exclude Product Price if Addon price is greater than zero: will only select the options price if there exist options price.

Remove Product Price even if addon price is zero: It can cause the price of the product zero in case no options are selected

Title

Set this form price as Fee : will set all the field prices as fees and fee will be counted once irrespective of the quantity. (Fee will be counted once irrespective of the quantity)

Process price set as Fee as WooCommerce Fee or Custom: We can configure it in two ways, as Woo Fee and Custom.

Woo Fee: Where it uses the default woocommerce Fee system, which will be added once per order and will be added after calculating the shipping price. For most cases, this must be working fine.

Custom: In the custom method, We achieved fee functionality, without depending WooCommerce Fee. In the custom case, it will be calculated before calculating the shipping price.

Exclude this form price from applying discounts: Discounts won’t affect the form prices once you enable this setting.

Contents/Strings

You can change the label names for the Summary section title Options Price, Product price, Total, and Fee, but is applicable only for the respective form only(local scope).

Price settings(Global)

Go to Product addons<<Settings

Here, all the options will be ticked by default. If you don’t want every option as selected you can un-tick them and click on save changes. The settings will take effect on every custom form you have created(Global scope).

There are some pricing settings in the next tab, Contents/Strings of the same path.

You can change the label names of different price options from here – Options price, Product price, Total, and Fee

The format for showing prices in field options can be changed from here.

You can also set a Product Price Prefix like ‘starting at’ before the product price on the archive page and the product page. Leave it blank if no prefix is needed. Eg: Starting at $150.00

Customer Support

If you have questions about our plugin(s), are experiencing issues with any of our plugin