WooCommerce Products And Variations Prices for Calculated Fields Form

Compatible with CFF: Free Professional Developer Platinum

WooCommerce Products Prices

The WooCommerce Products And Variations Prices for Calculated Fields Form plugin generates the woocommerce_cpcff_product_price variable in the products pages of WooCommerce. Furthermore, the plugin includes the get_product_price operation to get the price of a product given its id.


The WooCommerce Products And Variations Prices for Calculated Fields Form plugin generates the woocommerce_cpcff_product_price variable in the products pages of WooCommerce. Furthermore, the plugin includes the get_product_price operation to get the price of a product given its id.

This woocommerce_cpcff_product_price variable contains the product's price. For variable products, its value will be the price of the variation selected by the user.

You are free to use the woocommerce_cpcff_product_price variable in the equations of the forms inserted into the WooCommerce products (either using the CFF - WooCommerce add-on or NOT). For web forms inserted on other pages or posts, you can get the product's price by calling the get_product_price operation.

For variable products, the plugin reevaluates the equations every time the user selects a variation and updates the value of woocommerce_cpcff_product_price

The installation process of the "WooCommerce Products Prices" plugin is similar to other plugins in WordPress. Download the zip file with the plugin's code to your computer (visiting the download link provided after purchasing), and follow the steps below:

  1. Go to the Plugins section on your WordPress.
  2. Press the "Add New" button at the top of the Plugins section.
  3. Press the "Upload Plugin" button, and then select the zipped file downloaded previously.
  4. Finally, install and activate the plugin.

The plugin includes the menu option "Calculate Fields Form > WooCommerce Products Prices"

The new page allows you to register the copy of the plugin to receive the updates directly on your WordPress, instead of download and install them manually. Furthermore, this page allows deactivating the plugin completely, deleting its database and options.

To register the plugin, you should go to the menu option "Calculate Fields Form > WooCommerce Products Prices" enter the email address used to purchase the plugin, and press the "Register" button.

Registration Section
Plugin Registration.

The plugin generates the new variable woocommerce_cpcff_product_price in the products' pages, that you can use from your form. Simply use the new variable as part of your equations, and insert the form (either with the CFF - WooCommerce add-on or NOT) in the product page.

For example, assuming you have a product whose price corresponds to one square meter of the product, and the form includes two number fields, fieldname1 and fieldname2, for the width and length, respectively. And you want to calculate the cost of covering the area. The equation in the calculated field that calculates the cost would be:

fieldname1*fieldname2*woocommerce_cpcff_product_price

If you configure the WooCommerce product as "variable" and every variation (corresponding to the different colors of the product) has associated a price, the previous equation would be the same. The plugin will update the cost every time the user selects a different variation (color).

Equation
Equation.

If the form is not inserted in a product's page, but you need the product's price given its id, assuming the product's id is 123, you can implement the previous equation as follows:

fieldname1*fieldname2*get_product_price(123)

The WooCommerce Products And Variations Prices for Calculated Fields Form plugin does not cover the features of the CFF - WooCommerce add-on distributed with the Developer and Platinum versions of the Calculated Fields Form plugin. It allows using the prices of the products in the equations, but it does not vary them in the WooCommerce cart and orders.

Screenshots

Plugin Registration
Plugin Registration.
Equation
Equation.

5.99€

One time purchase

Details

Version 1.0.6
Last updated 2024/04/05

Compatibility

CFF Free All versions
CFF Professional All versions
CFF Developer All versions
CFF Platinum All versions
Tested up to WP 6.5