Sale!

Product Price by Formula for WooCommerce

Rated 5.00 out of 5 based on 1 customer rating
(1 customer review)

Set formula for automatic WooCommerce product price calculation.

Clear
Author: Tom Anbinder SKU: N/A Category: Tags: , Version: 2.1.1; Last updated: 2 months ago; Requires WordPress version: 4.4; Tested up to: 4.9

Description

This plugin is a premium version of free "Product Price by Formula for WooCommerce" plugin.

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

Plugin settings are accessible via “WooCommerce > Settings > Product Price by Formula”.

Bulk Settings

Product Price by Formula for WooCommerce - Bulk Settings

Enable for all products
Enables price calculation by formula for all products.
Default: no
Use same formula
Enables same formula for all products. Possible values: No; Yes (with individual params); Yes (with same params).
Default: No

Admin Settings

Product Price by Formula for WooCommerce - Admin Settings

Add dashboard widget
Adds default settings admin dashboard widget.
Default: no
Products list columns
Adds columns to the admin products list. Possible values: Formula; Params; Price.
Default: None

Advanced Settings

Product Price by Formula for WooCommerce - Advanced Settings

Shortcodes prefix
Optional prefix for all plugin’s shortcodes. E.g.: if set to my_prefix_, will transform [math_round] to [my_prefix_math_round].
Default: None
Price filters priority
Priority for WooCommerce price filters. Set to zero to use the default priority.
Default: 0

Default Formula Settings

You can set default settings here. All settings can later be changed on individual product’s edit page (in Product Price by Formula meta box).

In formula use x variable for product’s base price. For example: x+p1*p2. Please note that you can not use x or pN inside other params.

In formula and/or params use can also use shortcodes.

Please note that if you are using caching plugins and dynamic product pricing (e.g.: price changing with product stock ([product_stock]) or by customer’s location ([if_customer_location])), then caching needs to be disabled for products pages. If you want to keep caching enabled, you will need to cache product pages for each condition: for example for [if_customer_location] you can set Default customer location option to Geolocate (with page caching support) in WooCommerce > Settings > General.

Product Price by Formula for WooCommerce - Default Formula Settings

Formula
Price formula.
Default: None
Number of parameters
Save settings after you change this number – new settings fields will appear.
Default: 1
pN: Value
Parameter value.
Default: None
pN: Admin note (optional)
Optional parameter admin note.
Default: None

Shortcodes

[math_round] – Rounding shortcode. Number of decimals can be set with precision attribute.

Example

[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).

Example

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

[math_floor] – Rounding down (floor).

Example

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

[math_min] – Min value.

Example

[math_min value1="x*p1" value2="x*p2"]

[math_max] – Max value.

Example

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

[product_total_sales] – Retrieves product’s total sales number.

Example

[product_total_sales]

[product_stock] – Retrieves product’s stock.

Example

[product_stock]

[product_weight] – Retrieves product’s weight.

Example

[product_weight]

[product_length] – Retrieves product’s length.

Example

[product_length]

[product_width] – Retrieves product’s width.

Example

[product_width]

[product_height] – Retrieves product’s height.

Example

[product_height]

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

Example

[product_meta key="_weight"]

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

Example

[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]

[if_time] – Price by current time.

Example

[if_time from="00:00:00" to="11:59:59"]x*1.10[/if_time][if_time from="12:00:00" to="23:59:59"]x*1.20[/if_time]

[if_date] – Price by current date.

Example

[if_date from="2018-09-15 00:00:00" to="2018-10-15 23:59:59"]x*1.10[/if_date][if_date from="2018-10-16 00:00:00" to="2019-09-14 23:59:59"]x*1.20[/if_date]

[if_user_role] – Price by customer’s user role.

Example

[if_user_role role="guest,administrator"]x*1.10[/if_user_role][if_user_role not_role="guest,administrator"]x*1.20[/if_user_role]

[if_product_category] – Price by product’s category.

Example

x[if_product_category slug="cat1,cat2"]*1.10[/if_product_category][if_product_category not_slug="cat1,cat2"]*1.20[/if_product_category]

[if_product_tag] – Price by product’s tag.

Example

x[if_product_tag slug="tag1,tag2"]*1.10[/if_product_tag][if_product_tag not_slug="tag1,tag2"]*1.20[/if_product_tag]

[if_product_taxonomy] – Price by product’s taxonomy (any).

Example

x[if_product_taxonomy taxonomy="product_cat" slug="cat1,cat2"]*1.10[/if_product_taxonomy][if_product_taxonomy taxonomy="product_cat" not_slug="cat1,cat2"]*1.20[/if_product_taxonomy]

Examples

Let’s say product’s standard (i.e. original) price is $50 and its stock is 15 pcs. If you set Formula to x+p1*p2, Number of parameters to 2, p1 to 1.5 and p2 to [product_stock], then final price will be 50 + 1.5 * 15 = 72.5, i.e. $72.50.


Prices & Licenses

Single siteUnlimited sites
1 year$19.99 $9.99$49.99 $19.99
Lifetime$49.99 $19.99$99.99 $29.99

Refunds

We want to ensure that you are 100% happy with your purchase, so if you feel the product(s) you purchased are not the best fit for your requirements and you attempted to resolve issues with product's author, we are offering 30 day money back guarantee refund policy.

1 review for Product Price by Formula for WooCommerce

  1. Rated 5 out of 5

    djmfxp

    hi
    i want buy and use “Product Price by Formula for WooCommerce”

    but i want know some details

    i want use a unique single formula for all products(all product use a one formula)
    but any products use own paramaters for universal formula.

    can i do with this plugin?

Add a review

15 thoughts on "Product Price by Formula for WooCommerce"

  1. djmfxp January 13, 2018 at 11:19 am #

    hi
    i want buy and use “Product Price by Formula for WooCommerce”
    but i want know some details
    i want use a unique single formula for all products(all product use a one formula)
    but any products use own paramaters for universal formula.
    can i do with this plugin?

    Reply

    • djmfxp January 15, 2018 at 6:49 pm #

      hello?!!!!!!!!!!!!!!!

      Reply

    • Tom Anbinder January 16, 2018 at 10:11 am #

      Hi,

      Sorry for not replying earlier. Yes, you can do that, but after you save the parameters, if formula is changed, you have to go through all the products and update the formula. However this is easily fixable – please give me a minute and I’ll add this to the plugin. Will get back to you in a minute.

      Best regards,
      Tom

      Reply

  2. David March 30, 2018 at 10:48 am #

    Does this plugin allow to apply different formulas for different categories? e.g. CAT1 would be x*1.3 and CAT2 would be x*1.45 ???

    Reply

    • Tom Anbinder October 25, 2018 at 5:02 pm #

      Hi,

      In case if anyone else needs similar functionality – yes, it’s possible since plugin version 2.1.1. You’ll need to use [if_product_category] shortcode in formula for this, e.g.:

      x[if_product_category slug="cat1"]*1.3[/if_product_category][if_product_category slug="cat2"]*1.45[/if_product_category]

      * There are also similar [if_product_tag] and [if_product_taxonomy] shortcodes available.

      Reply

  3. Wolfi June 21, 2018 at 1:05 pm #

    Hi
    I really like this little plugin. I tried the free version and it fullfills my needs almost.
    I would like to buy this plugin, but its missing 1 very important feature which is mandatory for me.

    Is there a possibility to set price rounding to next close dezimal? eg 14.48 to 14.50 or 14.44 to 14.40

    My problem is that I would need this functionality / or possible hack rather quickly.

    Reply

    • Tom Anbinder October 24, 2018 at 10:23 pm #

      Hi,

      In case if anyone else has similar question – yes, this can be done by setting precision attribute to 1 in [math_round] shortcode, e.g.:

      [math_round precision="1"]x[/math_round]

      Reply

  4. gooran July 13, 2018 at 5:51 pm #

    Hi
    This plugin seems to be able to fulfill my needs, but i have to ask before purchase.
    I need all my product prices to be updated when i change the default value of my parameters.
    Does this plugin do that?

    I would appreciate it if you could reply ASAP.

    Reply

    • Sten Rosendahl October 19, 2018 at 11:12 pm #

      I need this too. As long as the value is not changed in a product, I want the changed global value to propagate down to the product (what I really need is a global margin setting for prices and this plugin comes close).

      Reply

      • Tom Anbinder October 23, 2018 at 3:26 pm #

        Hi,

        Sorry for the late reply. Not sure I understood it correctly. If you are using the “Default formula”, you can change the parameter there and product prices will change accordingly. For example, if you have x*1.05 formula, then after you change the margin (i.e. 1.05) product prices will be updated. Could you please try to explain it to me to once again (if possible maybe give an example of how this should work)?

        Reply

        • Sten Rosendahl October 23, 2018 at 4:02 pm #

          I mean that if I change the default value for a field in the settings of the plugin, I want that new value to ripple to all products using that field if it’s not overridden in that product. This to be able to have one global field only to change when all prices should be changed with the same percentage.

          Reply

        • Tom Anbinder October 24, 2018 at 10:14 pm #

          Hi,

          Hopefully I’ve understood you correctly – we’ve just released new plugin version 2.1.0. Now you can set “Use same formula” option to “Yes (with same params)” in plugin settings (in “WooCommerce > Settings > Product Price by Formula > Bulk Settings”), which should solve your task.

          Please give it a try and let me know if that was not it.

          Reply

  5. Ms September 28, 2018 at 3:18 pm #

    There may be possibility to change the names of the parameters ?
    that i will know what the value of the parameter; like p1 will bee “paypalfee”, p2 “handlingfee” etc..

    Reply

    • Tom Anbinder October 2, 2018 at 9:23 pm #

      Hi,

      We’ve just released new plugin version 1.1.0. Unfortunately I didn’t manage to add custom parameter naming there, however we have added “Admin note” option for each parameter (it’s in “WooCommerce > Settings > Product Price by Formula > Default Settings”). Please let me know if that’s good enough.

      Reply

  6. Harris Karanikolas December 4, 2018 at 6:11 pm #

    Hello,

    Is it possible to add to the formula the cart quantity?
    My senario is this:
    10000qty of a product that cost 2€ with shipping cost of 3000€ of any qty someone will order.
    So even if someone orders 10000 or 20000 the shipping cost will be 3000.
    What i want to do is depending on the total cart quantity of products to divide the 3000 with that and then add it to the product price.
    So if someone has 10000 quantity then it should be 3000/10000=0.30€
    Product price would then be 2.30€.
    If then i order another 10000 of an other product that also cost 2€ that means that the shipping per product is 3000/20000=0.15€
    So now it should show 2.15€ as cost per lighter.

    Thanks in advance!

    Reply

Leave a Reply

Changelog

= 2.1.1 - 25/10/2018 =
* Dev - [if_product_taxonomy] shortcode added.
* Dev - [if_product_category] shortcode added.
* Dev - [if_product_tag] shortcode added.
* Dev - Maximum number of "price by formula" enabled products in free version increased to 10.
* Dev - Products list columns - "Formula Enabled" column added.

= 2.1.0 - 25/10/2018 =
* Dev - Use same formula - "Yes (with same params)" option added.
* Dev - Per Product - Calculation - "Use default formula with individual params" option added.
* Dev - Per Product - Calculation - Displaying info in case of global override.
* Dev - Code refactoring.

= 2.0.0 - 10/10/2018 =
* Dev - [product_length] shortcode added.
* Dev - [product_width] shortcode added.
* Dev - [product_height] shortcode added.
* Dev - [product_weight] shortcode added (and %weight% value marked as deprecated).
* Dev - [product_stock] shortcode added (and %stock% value marked as deprecated).
* Dev - [product_total_sales] shortcode added (and %total_sales% value marked as deprecated).
* Dev - [product_meta] shortcode added.
* Dev - [if_customer_location] shortcode added.
* Dev - [if_user_role] shortcode added.
* Dev - [if_time] shortcode added.
* Dev - [if_date] shortcode added.
* Dev - [math_round] shortcode added (and "Final price rounding" section marked as deprecated).
* Dev - [math_ceil] shortcode added.
* Dev - [math_floor] shortcode added.
* Dev - [math_min] shortcode added.
* Dev - [math_max] shortcode added.
* Dev - Admin Settings - "Products list columns" option added.
* Dev - Default formula settings moved to separate "Default Formula" section.
* Dev - "Advanced Settings" subsection added ("Shortcodes prefix", "Price filters priority" options).
* Dev - Admin settings restyled and descriptions updated.
* Dev - Major code refactoring.

= 1.1.0 - 03/10/2018 =
* Dev - "Add default settings admin dashboard widget" option added.
* Dev - "Admin note" option added for each parameter.
* Dev - "Final price rounding" options added.
* Dev - "Use same formula for all products (with individual params)" option added.
* Dev - %weight% special value added.
* Dev - Hiding "Enabled" option in per product settings if "Enable price calculation by formula for all products" is enabled.
* Dev - Formulas with no (i.e. zero) parameters are now allowed.
* Dev - Major code refactoring (special values; version_updated() etc.).
* Dev - Admin settings minor restyling (and small fixes).
* Dev - "WC tested up to" added to plugin header.
* Dev - Plugin URI updated.

= 1.0.0 - 12/09/2017 =
* Initial Release.

Installation

  • Buy the plugin 🙂
  • Download plugin's zip to your computer (you will receive an email with download link, or you can always download the plugin from your account).
  • Go to Admin Dashboard > Plugins > Add New > Upload Plugin and browse for downloaded zip file.
  • If plugin is successfully installed - you should see it added to the Plugins list.

Updates

To keep WPCodeFactory items up to date, please install WPCodeFactory Helper plugin and enter your site key.