Title: HDWebmobile Formula Pricing
Author: HDWebMobile
Published: <strong>অক্টোবৰ 13, 2026</strong>
Last modified: অক্টোবৰ 14, 2026

---

প্লাগিনৰ সন্ধান কৰক

![](https://ps.w.org/hdwebmobile-formula-pricing/assets/banner-772x250.png?rev=3745071)

![](https://ps.w.org/hdwebmobile-formula-pricing/assets/icon-256x256.png?rev=3745071)

# HDWebmobile Formula Pricing

 [HDWebMobile](https://profiles.wordpress.org/htrxuan/)-ৰ দ্বাৰা

[ডাউনল’ড কৰক](https://downloads.wordpress.org/plugin/hdwebmobile-formula-pricing.1.0.0.zip)

 * [বিশদ বিৱৰণ](https://as.wordpress.org/plugins/hdwebmobile-formula-pricing/#description)
 * [পৰ্য্যালোচনা](https://as.wordpress.org/plugins/hdwebmobile-formula-pricing/#reviews)
 *  [ইনষ্টলেশ্যন](https://as.wordpress.org/plugins/hdwebmobile-formula-pricing/#installation)
 * [বিকাশ](https://as.wordpress.org/plugins/hdwebmobile-formula-pricing/#developers)

 [সাহায্য](https://wordpress.org/support/plugin/hdwebmobile-formula-pricing/)

## বৰ্ণনা

HDWebmobile Formula Pricing lets customers enter measurements or quantities on the
product page, and prices the product live from a formula you write using those field
names (e.g. `10 + width * height * 0.05` for a custom-cut material priced by area).
This is a common real need for stores selling custom-sized fabric, framed prints,
engraved items, or anything priced by dimension or quantity, not just a flat number.

#### Security by design

The simplest way to implement formula-based pricing — passing the merchant’s formula
text straight into PHP’s `eval()` at calculation time — is also the most dangerous:
it turns any formula input into a remote code execution path. This plugin closes
that entire vulnerability class by construction:

 * The formula is tokenized character-by-character into a strict set of allowed 
   pieces: numbers, your own configured field names, and the four arithmetic operators
   plus parentheses. Anything else in the formula text — any other letter sequence,
   any function-call-looking pattern, any special character — causes the formula
   to be rejected outright when you save it.
 * The token stream is evaluated by a small hand-written arithmetic parser. There
   is no `eval()`, no `create_function()`, no dynamic function dispatch of any kind
   anywhere in this plugin — the only operations that can ever run are addition,
   subtraction, multiplication, and division of plain numbers.
 * The customer-facing live price preview also never exposes your formula to the
   browser: it’s computed by an AJAX call back to your own server, through the exact
   same safe evaluator used at checkout, so the formula text itself is never sent
   to a visitor’s browser.
 * The real price used at checkout is always recomputed server-side from the product’s
   own stored fields and formula — never trusted from what the browser submitted.

#### Key Features

 * Add up to 6 numeric input fields per product (label, variable name, min/max bounds,
   default value)
 * Write a formula referencing those fields by name — validated for safety the moment
   you save it
 * Live price preview on the product page as the customer types, computed server-
   side
 * Optional minimum/maximum price clamps, so no combination of inputs can produce
   an unreasonable price
 * Every field’s min/max bounds are enforced again server-side at add-to-cart time,
   not just in the browser
 * Field values show on the cart, checkout, and order screens exactly as entered

#### Limitations (please read before installing)

 * Simple products only in this version — no variable-product support
 * Formulas support only +, -, *, /, and parentheses (no exponents, square roots,
   or conditional logic) — deliberately, since a richer grammar is a larger safety
   surface to get right
 * No formula “test” button in the admin beyond the save-time validation — if a 
   formula is rejected, the error message names exactly what’s wrong (an unknown
   variable, a bad character, division by zero with the values you tried)
 * Requires a Regular Price to be set on the product (even a nominal placeholder)—
   this is standard WooCommerce behavior for any product with no price at all, not
   something this plugin can work around

#### Enjoying this plugin?

If it helps your site, please consider [leaving an honest review on WordPress.org](https://wordpress.org/support/plugin/hdwebmobile-formula-pricing/reviews/#new-post)—
it helps other WordPress users find it. Found a problem or have an idea? Please 
[open a support topic](https://wordpress.org/support/plugin/hdwebmobile-formula-pricing/)
first so it can be fixed.

### How to Use

#### 1. Add your input fields

On a simple product’s “Formula Pricing” tab, click “+ Add Field” for each number
the customer should enter (e.g. “Width in cm” with variable name `width`). Set a
minimum, an optional maximum, and a default value for each.

#### 2. Write the formula

In the Formula box, write an expression using your field names exactly as shown,
e.g. `10 + width * height * 0.05`. Save the product — if the formula uses anything
other than your field names, numbers, and `+ - * / ( )`, you’ll see exactly what’s
wrong and the formula won’t be saved until it’s fixed.

#### 3. What the customer sees

The product page shows your input fields above the Add to Cart button, with a live
estimated price that updates as they type. The real price is confirmed the moment
the product is actually added to the cart.

#### 4. Keeping prices sane

Set an optional minimum and/or maximum price on the same tab — no matter what a 
customer enters (within their allowed field ranges), the final price is clamped 
to stay within those bounds.

## স্ক্ৰীনশ্বট

[⌊The Formula Pricing tab on a product's edit screen -- fields and formula configuration.⌉⌊
The Formula Pricing tab on a product's edit screen -- fields and formula configuration
.⌉[

The Formula Pricing tab on a product’s edit screen — fields and formula configuration.

[⌊The customer-facing input fields and live price preview on the product page.⌉⌊
The customer-facing input fields and live price preview on the product page.⌉[

The customer-facing input fields and live price preview on the product page.

[⌊A cart line item showing the entered measurements alongside the computed price.⌉⌊
A cart line item showing the entered measurements alongside the computed price.⌉[

A cart line item showing the entered measurements alongside the computed price.

## ইনষ্টলেশ্যন

 1. Upload the plugin files to the `/wp-content/plugins/hdwebmobile-formula-pricing`
    directory, or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress. WooCommerce must
    already be installed and active.
 3. Edit a simple product, open its new “Formula Pricing” tab under Product Data, add
    your fields and formula.
 4. On the product’s “General” tab, set a Regular Price — WooCommerce hides the entire
    purchase form on a product with no price at all, even with formula pricing enabled,
    so enter at least a nominal placeholder amount (it will be overridden the moment
    a customer enters a value).

## পৰ্য্যালোচনা

এই প্লাগিনৰ বাবে কোনো পৰ্য্যালোচনা নাই।

## অৱদানকাৰী আৰু বিকাশকাৰীসকল

“HDWebmobile Formula Pricing” হৈছে মুক্ত উৎসৰ ছফ্টৱেৰ। এইসকল লোকে এই প্লাগিনত অৱদান
আগবঢ়াইছে।

অৱদানকাৰীসকল

 *   [ HDWebMobile ](https://profiles.wordpress.org/htrxuan/)

[আপোনাৰ ভাষাত “HDWebmobile Formula Pricing” অনুবাদ কৰক।](https://translate.wordpress.org/projects/wp-plugins/hdwebmobile-formula-pricing)

### বিকাশৰ প্ৰতি আগ্ৰহী?

[ক’ড ব্ৰাউজ কৰক](https://plugins.trac.wordpress.org/browser/hdwebmobile-formula-pricing/),
[SVN ৰিপজিটৰী](https://plugins.svn.wordpress.org/hdwebmobile-formula-pricing/) চাওক
নাইবা [RSS](https://plugins.trac.wordpress.org/log/hdwebmobile-formula-pricing/?limit=100&mode=stop_on_copy&format=rss)-
দ্বাৰা [বিকাশৰ পঞ্জী](https://plugins.trac.wordpress.org/log/hdwebmobile-formula-pricing/)
ছাবস্ক্ৰাইব কৰক।

## সলনি-পঞ্জী

#### 1.0.0

 * Initial release: per-product numeric input fields, safe formula evaluation via
   a hand-written tokenizer and recursive-descent parser (no eval()), server-side
   live price preview via AJAX, min/max price clamping, field values shown on cart/
   checkout/order screens.

## মেটা

 *  **1.0.0** সংস্কৰণ
 *  **3 দিন আগত** শেষবাৰ আপডে’ট হৈছিল
 *  সক্ৰিয় ইনষ্টলেশ্যন **10টাতকৈ কম**
 *  WordPress-ৰ সংস্কৰণ ** 6.9 বা তাতকৈ ওপৰৰ **
 *  ইমানলৈকে পৰীক্ষা কৰা হৈছে **7.1.3**
 *  PHP-ৰ সংস্কৰণ ** 7.4 বা তাতকৈ ওপৰৰ **
 *  ভাষা
 * [English (US)](https://wordpress.org/plugins/hdwebmobile-formula-pricing/)
 * [calculator](https://as.wordpress.org/plugins/tags/calculator/)[Custom Pricing](https://as.wordpress.org/plugins/tags/custom-pricing/)
   [dynamic pricing](https://as.wordpress.org/plugins/tags/dynamic-pricing/)[formula](https://as.wordpress.org/plugins/tags/formula/)
   [woocommerce](https://as.wordpress.org/plugins/tags/woocommerce/)
 *  টেগবোৰ
 *  [উচ্চখাপৰ ভিউ](https://as.wordpress.org/plugins/hdwebmobile-formula-pricing/advanced/)

## ৰে’টিংবোৰ

এতিয়ালৈ কোনো পৰ্য্যালোচনা দাখিল কৰা হোৱা নাই।

[Your review](https://wordpress.org/support/plugin/hdwebmobile-formula-pricing/reviews/#new-post)

[সকলো পৰ্য্যালোচনা চাওক](https://wordpress.org/support/plugin/hdwebmobile-formula-pricing/reviews/)

## অৱদানকাৰীসকল

 *   [ HDWebMobile ](https://profiles.wordpress.org/htrxuan/)

## সাহায্য

কিবা ক’বলগীয়া আছে? সহায় লাগে?

 [সাহায্যৰ ফ’ৰাম চাওক](https://wordpress.org/support/plugin/hdwebmobile-formula-pricing/)

## দান কৰক

আপুনি এই প্লাগিনৰ উন্নতিৰ প্ৰতি সাহায্য আগবঢ়াব বিচাৰেনে?

 [ এই প্লাগিনক অনুদান দিয়ক ](https://paypal.me/htrxuan/20)