Introduction
WC Fields Factory supports custom pricing & custom cart fee. what it does is change or replace product price based on the custom fields value. It also allows you to add custom cart fee based on fields value.
Custom Pricing : This feature changes the product price based on the options selected by the customers.
Custom Cart Fee : This feature adds cart fee based on the selected options by the customer.
In order to achieve that, we need to set one or more rules (as needed) for the fields (whichever fields that affects the product price). Custom pricing & fee is available only for Product Fields & Variation Fields. WC Fields Factory supports custom pricing & fee for the following field types.
- Text
- Number
- Textarea
- Select
- Checkbox
- Radio Button
- Date Picker
- Color Picker
In the wp-admin
go to Fields Factory -> Product Fields
and click on any product fields group to edit. Now click on a field that needs the pricing rule, now the meta editor for that particular field will be opened. At the top of the fields meta editor there are three tabs, Field Meta, Pricing Rules and Field Rules.
Click on the Pricing Rules tab to set the pricing rules.
How the calculation works
Cost : The value set on the matching rule will be added, subtracted or replaced.
Percent : The value set on the matching rule will used as percent to be added, subtracted or replaced.
Note : When setting fee rules we can exclude or include the tax on the Fee.
Pricing & Fee Rules for Text
If user entered text : is equal to
, is not equal to
or is not null
.
Expected value : Text value which will be used to compare the customer’s value.
Title : Set the title for this rule (which can be displayed on Cart, Checkout & Order).
Amount : The value that would be used to modify the price (If the rule is matched).
Pricing & Fee Rules for Number
If user entered number : is equal to
, is not equal to
, less than
, less than or equal to
, greater than
, greater than or equal to
or is not null
.
Expected value : Number value which will be used to compare the customer’s value.
Title : Set the title for this rule.
Amount : The value that would be used to modify the price (If the rule is matched).
Pricing & Fee Rules for Text Area
If user entered text : is equal to
, is not equal to
or is not null
.
Expected value : Text value which will be used to compare the customer’s value.
Title : Set the title for this rule.
Amount : The value that would be used to modify the price (If the rule is matched).
Pricing & Fee Rules for Select
If user’s selected option : is equal to
or is not equal to
.
Expected option : The option which will be used to compare the customer’s selected option.
Title : Set the title for this rule.
Amount : The value that would be used to modify the price (If the rule is matched).
Pricing & Fee Rules for Check Box
The option chosen by user : Checked
Expected option : The option which will be used to compare the customer’s selected option.
Title : Set the title for this rule.
Amount : The value that would be used to modify the price (If the rule is matched).
Pricing & Fee Rules for Radio Button
If user’s selected option : is equal to
or is not equal to
.
Expected option : The option which will be used to compare the customer’s selected option.
Title : Set the title for this rule.
Amount : The value that would be used to modify the price (If the rule is matched).
Pricing & Fee Rules for Color Picker
If user picked color : is equal to
, is not equal to
or is not null
.
Expected value : color value which will be used to compare the customer’s value.
Title : Set the title for this rule.
Amount : The value that would be used to modify the price (If the rule is matched).
Pricing & Fee Rules for Date Picker
Days : If the user picked date is one of these week days.
Specific Dates : The dates that should be matched with the user picked date (multiple dates can be set by comma delimiter).
Weekends or Weekdays : If the user picked date is falls in week end or week days.
Specific Date Each Month : If the user picked date is same regardless of the year and month.
Expected value : date value which will be used to compare the customer’s value.
Title : Set the title for this rule.
Amount : The value that would be used to modify the price (If the rule is matched).
Kim Dailey November 23, 2022
My client wants customers to be able to pay invoices, where each invoice has a different amount. Is there a way to enter a variable in the pricing rule that adds whatever the user entered in a number field to the base cost of $0.00?
Larraine January 18, 2023
I have followed all the instructions for the pricing rule on a text field but it just doesn’t work. Can you help please?