Title: Documentation?
Last modified: December 29, 2017

---

# Documentation?

 *  Resolved [Mark Tomlinson](https://wordpress.org/support/users/marktomlinson/)
 * (@marktomlinson)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/documentation-174/)
 * Anything? Even pop-up help on how to write a formula would be helpful.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Algoritmika](https://wordpress.org/support/users/algoritmika/)
 * (@algoritmika)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/documentation-174/#post-9822896)
 * Hi [@marktomlinson](https://wordpress.org/support/users/marktomlinson/),
 * Thanks for pointing this out – will definitely add some descriptions to the plugin
   in next version. Meanwhile here is a couple examples:
 * If you set _Formula_ to `x*p1` and _p1_ to `1.10` then prices for products will
   be increased by 10%. That is: `x` is always substituted by product’s original
   price, and `p1` you set manually.
 * You can also use “special” values: `%total_sales%` and `%stock%`. For example,
   let’s say you have initial stock of 100 pcs. for product, original product’s 
   price of 200$, and want to start selling from 100$ and go up to 200$ with each
   sold piece, then you can set _Formula_ to `x-p1` and _p1_ to `%stock%`.
 * If you could let me know what scenario do you need to achieve – I could tell 
   you the exact values you need to set (or if scenario is not possible at the moment–
   I will gladly add it to the plugin).
 * Hope I made it a little more clear – please let me know if you have any questions
   or suggestions.
 * Best regards,
    Tom
 *  [ronhelpers](https://wordpress.org/support/users/ronhelpers/)
 * (@ronhelpers)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/documentation-174/#post-9870972)
 * I have a more complicated pricing formula needed… Hope you can add an update 
   using some “min” and “average”
 * Like I said very complicated:
 * Sample:
    Product price: 210usd Min Quantity to Order: 10pcs Max Quantity to Order:
   N/A Max Discount can give: 61% if order 100pcs or more.
 * Now the scenario/formula:
    (average(1-(0.61*(min(1,({cart_quantity}-10)/(100-
   10)))))*{product_original_price})
 * If the customer order the product with the minimum qty of 10 the total value 
   is 2100usd but if he add 1 or 2 or more the unit price will change. instead of
   210usd/item it will 210usd-discount then multiply by the item qty.
 * Now if the customer order 100pcs the max discount we can give is 61% but more
   than 100pcs still the max discount apply.
 * Sorry if it is to complicated but if you could just add an option to hook the
   product quantity
 * But if you have a much easier way. Very well appropriated if you could give some
   inputs.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Documentation?’ is closed to new replies.

 * ![](https://ps.w.org/product-price-by-formula-for-woocommerce/assets/icon-256x256.
   png?rev=2567213)
 * [Product Price by Formula for WooCommerce](https://wordpress.org/plugins/product-price-by-formula-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/product-price-by-formula-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/product-price-by-formula-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/product-price-by-formula-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/product-price-by-formula-for-woocommerce/reviews/)

## Tags

 * [calculation](https://wordpress.org/support/topic-tag/calculation/)

 * 2 replies
 * 3 participants
 * Last reply from: [ronhelpers](https://wordpress.org/support/users/ronhelpers/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/documentation-174/#post-9870972)
 * Status: resolved