Reputation: 3
Please advise what plugin would be suitable for the following calculations below:
Product Rectangle:
a
= length
b
= width
p1
= price per sq m (area)
p2
= price per m (perimeter)
Calculation based on the total area of product a x b x p1 = x
Calculation based on product perimeter (2a + 2b) x p2 = y
Total price = x + y
WooCommerce Measurement Price Calculator is a great plugin but unfortunately can not be set in order to add two Prices based on two parameters. It is possible that this calculation can be achieved by another plugin? Maybe other then WMPC or Gravity Forms?
Upvotes: 0
Views: 2899
Reputation: 60
Even though this is an old post I think the Plugin Product Price by Formula for WooCommerce might be a possible solution.
The short Documentation on the Product page is very good. Pro version is not needed for many use cases. You could use the following formula:
([product_width]*[product_height]*p1)+((2*[product_width]+2*[product_height])*p2)
[product_width]
and [product_height]
are just that.
p1
and p2
can be defined as parameters in the plugin's settings / formula editor.
Upvotes: 0
Reputation: 26
I don't think there is a plugin that does that specific set of calculations. I would recommend thinking outside the box a bit. If I were trying to accomplish this, I probably would use the Price Calculator plugin and use the Composite plugin. Then setup a single, hidden, product for each calculation you're looking to do. Then setup the composite product to include both. That way you can calculate the individual product equations and then have the grand total be calculated in the end. To me, that would be the simplest solution.
Upvotes: 1