Product Price by Formula for WooCommerce

Product Price by Formula for WooCommerce

Thank you for using our Product Price by Formula for the WooCommerce plugin. In the following sections, here we will show you how to set up, and as well as use the plugin in the easiest way possible.

Purpose

Product Price by Formula for WooCommerce plugin lets you set formula for automatic WooCommerce product price calculation.

Installation

After download, the .zip package, unzip it and you will see a folder “product-price-by-formula-for-woocommerce-pro”.

Go to Dashboard → Plugins → Add New and click Upload Plugin.

Upload Plugin

On the next page, select the “product-price-by-formula-for-woocommerce-pro” file and click Install Now.

Product Price by Formula for WooCommerce - Admin Screenshot
Product Price by Formula for WooCommerce – Admin Screenshot

After uploading the plugin, then click Activate Now link to activate the plugin.

Settings

Now, you will see the plugin settings page in the WooCommerce → Settings → Product Price by Formula tab.
Product Price by Formula for WooCommerce - Admin Settings

Upgrade

If you have an old version of the plugin, then please follow the steps below to update it to the latest version:

  • Download the .zip package, unzip it and you will see a folder “product-price-by-formula-for-woocommerce-pro”.
  • Unzip the “product-price-by-formula-for-woocommerce-pro” to get “product-price-by-formula-for-woocommerce-pro.
  • Upload “product-price-by-formula-for-woocommerce-pro” folder to the /wp-content/plugins/ directory, and overwrite old plugin files.

Features

  • Enable for all products
  • Disable for product IDs
  • Disable for product category IDs
  • Use same formula
  • Disable for empty price
  • Price filters priority

Configuration

There are two tabs: General, and as well as Default Formula.
First, we will see the General tab.

Product Price by Formula Options

Product Price by Formula for WooCommerce uses to enable as well as disable Related Products Manager on the product edit page on WordPress admin.
Default: Checked
Admin Settings
Output
Product Price by Formula for WooCommerce - Admin Settings

Bulk Settings Options

Enable for all products: Enables price calculation by the formula for all products by checking the checkbox.
Default: Unchecked
Disable fo product IDs: If you have checked “Enable for all products” option, also you can optionally add product exceptions here (i.e. price calculation by the formula will be disabled for these products). As well as, set it as a comma-separated list of product IDs.
Default: None
As below is the Bulk Settings screenshot.
Product Price by Formula for WooCommerce - Admin Settings
Disable for product category IDs:  If you have checked the “Enable for all products” option, you can optionally add product category exceptions here (i.e. price calculation by the formula will be disabled for these product categories). Additionally, you can set it as a comma-separated list of product category IDs.
Default: None

Before enable for all products:
Product Price by Formula for WooCommerce - Admin Settings
Also, the enabled dropdown has two values Yes as well as No.
After enable for all products:
Product Price by Formula for WooCommerce - Admin Settings
After enabled, it is just a read-only textbox with value Yes.
Use same formula: Enables the same formula for all products.
Possible values: No, Yes (with individual params), and as well as Yes (with same params).
Default: No

General Settings Options

As below is the screenshot for the General Settings.
Product Price by Formula for WooCommerce - Admin Settings
Disable for empty price: Here, you can disable price by the formula for products with empty price.
Default: Checked

Admin Settings Options

Here, Below is the screenshot for the Admin Settings.
Product Price by Formula for WooCommerce - Admin Settings
Add dashboard widget: Here, you add default settings admin dashboard widget.
Default: Unchecked
A Dashboard widget of Product Price by Formula adds to the WordPress Dashboard shown in the below screenshot.
Product Price by Formula for WooCommerce - Admin Settings
Products list columns: Add columns to the admin products list. Here, it has four values: Formula Enabled, Formula, Params, and as well as Price. As well as, we have also added Formula to the admin products list shown in the below screenshot.
Product Price by Formula for WooCommerce - Admin Settings
Also, you can add multiple columns to the admin products list.

Advanced Settings Options

Here, Below is the Advanced Settings Options screenshot.
Advanced Settings
Shortcodes prefix: It is optional. Prefix for all Plugin’s shortcodes. e.g. If set to “my_prefix_” will transform [math_round] to [my_prefix_math_round].
Price filters priority: Priority fo Woocommerce price filter. Also, set to zero to use the default priority.
Default: 0
Plugin URLs: By default plugin applies price calculations on frontend only. Hence, If you need to apply it to other URLs, enter URLs here. One URL per line. e.g. /wp-admin/edit.php?post_type=product
Default: None
Price changes: Disable price by a formula for products with “price changes”. Hence, try enabling this checkbox, if you are having compatibility issues with other plugins.
Default: Unchecked

Reset Settings Options

Reset section settings: It uses to reset all the settings.
Default: Unchecked
Reset Settings

Now, we will see Default Formula Setting.
The below screenshot is for the Default Formula Setting.
Product Price by Formula for WooCommerce - Admin Settings

Default Formula Settings

Here, you can set default settings. All settings can later change on the individual product’s edit page (in Product Price by Formula meta box).
The product price formula can set with standard mathematical operations.
e.g. x*1.5+p1/p2
In formula use x variable for product’s base price. For example: x+p1*p2. So, please note that you can not use x or pN inside other params.
Example :

  • [math_round] – Rounding shortcode. Some decimals can set with precision attributes.

[math_round precision="1"][if_customer_location country="US,CA"]x*1.10[/if_customer_location][if_customer_location not_country="US,CA"]x*1.20[/if_customer_location][/math_round]

  • [math_ceil] – Rounding up (ceil).

[math_ceil]x*[product_weight][/math_ceil]

  • [math_floor] – Rounding down (floor).

[math_floor]x*[product_length][/math_floor]

  • [math_max] – Max value.

[math_max value1="x*p1" value2="{product_total_sales}"]

  • [product_meta] – Retrieves any meta for the product. Here, meta key is set by required key attribute.

[product_meta key="_weight"]

  • [if_customer_location] – Price by customer’s location (by IP).

[if_customer_location country=”US,CA”]x*1.10[/if_customer_location][if_customer_location not_country=”US,CA”]x*1.20[/if_customer_location]

Reset Settings Options

Reset Settings

Reset section settings : It is used to reset all the settings.
Default: Unchecked