Description
Total Cost Input for WooCommerce plugin lets customers enter the amount of money they want to spend. The matching product quantity is calculated for them and shown right next to the sum (and, in the PRO version, the customer can also type the quantity and the two numbers stay in sync).
This plugin is ideal to sell products that can not be counted in portions, like liquids, powders, gas, cryptocurrencies, etc.
With this plugin used, your customer can just enter a sum, like $100 for example, and buy some amount of product you are selling, in grams, litres, bitcoins, etc.
It can be a valuable addition to your crypto selling store with the Cryptocurrency WordPress Plugin for WooCommerce!
FREE Features
Total Cost Inputis a per-product product type: tick the checkbox on a product and that product, and only that product, asks for a sum instead of a quantity- The
Total Cost Inputfield on the product page of an opted-in product: the customer enters the amount of money and the resulting quantity is calculated for them - A product-sale widget – the
[total_cost_input_widget]shortcode and theTotal Cost Input: ProductGutenberg block:- a dropdown of every product that can be bought right now (purchasable, in stock, visible in the catalog); the list shows product names only, without prices
- an amount field in the site currency – the customer types the sum and the widget buys the matching quantity
- a quantity field next to the sum: it is shown (read-only) and is updated as the customer types the amount, so the buyer sees the units before paying; the posted quantity is the same number
- a
Buybutton that adds the product to the cart and takes the customer straight to the checkout - a configurable field order, so the card can be arranged the way you sell – including the product after the quantity – set per shortcode/block with the
orderattribute, in the block inspector, or site-wide on the settings screen - a 12-column grid: every field’s width is a span of
1to12columns (orfullfor all twelve, which is the default), set per shortcode/block with thewidthsattribute, with the width selects in the block inspector, or as one line on the settings screen. A field that spans 12 columns takes the whole row, so a card of default fields stacks vertically and smaller spans sit in a row; fields whose spans add up to more than 12 wrap onto the next line – there is no separate layout switch - the Material design look by default: an elevated card, outlined fields and a filled button, so the widget looks finished without any styling
- The
Product Quantity Stepsetting – sell fractional quantities (enter0.1and the customer can buy0.1,0.2,0.3…), in the FREE version too
PRO Features
The PRO version includes all FREE features, plus:
- Option to show both, the
Total Cost InputandQuantityfields on the product page - The widget’s quantity field becomes editable – in place of the read-only quantity the customer can type the units too, and the two numbers are kept in sync in both directions: type a sum and the units follow, type the units and the sum follows
- The widget’s product list restriction – sell only the products you choose, not the whole catalog
- The widget’s custom button text instead of
Buy - The widget’s theme style – apply the style of the site theme to the widget, so it inherits the theme’s background, borders, font and corner radii and the plugin only keeps the layout
- The widget’s custom style, set in the block inspector or on the settings screen – background colour of the widget and of the button, text colour, font family, font size and the corner radius of the widget and of the button, on top of the included Material default
- The widget’s vendor restriction – on a WC Vendors, Dokan or WCFM page the dropdown offers that vendor’s products only
Not supported yet
Block-based product surfaces are not supported yet. The Total Cost Input field works on the classic single-product template and on the classic cart and checkout. The block versions of those pages (the Single Product block, the Cart and Checkout blocks) render the quantity field on the client side and therefore ignore the plugin’s field:
- Single Product block – no
Total Cost Inputfield; - Cart and Checkout blocks – no money/quantity synchronisation.
Use the classic templates (or the [total_cost_input_widget] shortcode / block, which is unaffected) until a future release adds the block support.
l10n
This plugin is localization ready.
Languages this plugin is available now:
- English
- Arabic (عرب)
- Czech (čeština)
- Danish (Dansk)
- German (Deutsche)
- Greek (Ελληνικά)
- Spanish (Español)
- Persian (فارسی)
- French (Français)
- Hebrew (עִברִית)
- Hindi (हिन्दी)
- Indonesian (Bahasa Indonesia)
- Italian (Italiano)
- Japanese (日本)
- Korean (한국인)
- Malay (Melayu)
- Norwegian (Norsk)
- Netherlandish (Nederlands)
- Polish (Polski)
- Portuguese (Português)
- Russian (Русский)
- Slovak (Slovenský)
- Finnish (Suomalainen)
- Swedish (Svenska)
- Thai (ไทย)
- Philippine (Pilipinas)
- Turkish (Türk)
- Vietnamese (Tiếng Việt)
- Chinese (中国人)
Feel free to translate this plugin to your language.
Installation
- Install and activate it as you would any other plugin.
- Make a new WooCommerce product, or just check the
Total Cost Inputcheckbox on an existing one. - To sell from a widget, drop the
[total_cost_input_widget]shortcode (or theTotal Cost Input: Productblock) into a page.
Screenshots













Changelog
2.0.0
- Rewritten on a layered architecture:
app/is split into Domain / Views / Controllers / Modules, andInfrastructure\Hooksis the only place that registers a hook. The plugin option, the product meta key, the public hooks and thetotal_costasset handle are unchanged, so an upgrade keeps the configuration. - The
Total Cost Inputper-product checkbox is now part of the FREE version. - The
Product Quantity Stepsetting is FREE too: enter0.1and the customer can buy0.1,0.2,0.3… without a licence. - The
global/quantity-input.phptemplate override was rebased on WooCommerce 10.1.0 (unifiedwoocommerce_before/after_quantity_input_fieldhooks,aria-label, conditionalsize/max). - The PRO-only “show the quantity field too” option no longer hides the field with CSS: the standard quantity input is a hidden field and the visible one is rendered by PRO only.
- New product-sale widget: the
[total_cost_input_widget]shortcode and theTotal Cost Input: ProductGutenberg block – a dropdown of every product that can be bought right now (names only, no prices) and aBuybutton that adds the product to the cart and takes the customer straight to the checkout. - PRO: the widget’s amount field (a sum in the site currency), the product-list restriction, a custom button text, a theme style (the widget inherits the site theme’s own styling), a custom style (widget and button background, text colour, font family and size, corner radius) and the vendor restriction on WC Vendors / Dokan / WCFM pages.
- The widget is a flat 12-column grid: every field claims a span of
1to12columns and a field that spans all twelve takes the whole row, so the card stacks by default and smaller spans make a row. The oldlayoutattribute/option (vertical/horizontal) is gone – the spans are the layout. - The front end is a Vite + React bundle. jQuery is no longer used – not a dependency, not in the code – and
assets/widget.jsand the root*.js/*.min.jsfiles are gone. - A widget that renders nothing publishes the reason (
empty_catalog,no_vendor,no_vendor_products) throughtotal_cost_input_for_woocommerce_widget_empty. - The
productsattribute of the widget is cast with(int), so a negative id means “no products” rather than product 1. - Requires WordPress 6.6 and PHP 7.4; tested up to WordPress 7.1 and WooCommerce 11.2.
- Known limitation: block-based product surfaces (the Single Product block, the Cart and Checkout blocks) are not supported yet.
1.1.3
- freemius library version update
- tested up to WordPress 7.1 and WooCommerce 11.2
1.1.2
- freemius library version update
1.1.1
- freemius library version update
1.1.0
- The
Product Quantity Stepsetting is introduced. Enter 0.1 to allow customer to buy 0.1, 0.2, 0.3, e.t.c. quantity of your products.
1.0.2
- WooCommerce
global/quantity-input.phptemplate update to the latest version
1.0.1
- freemius library version update
1.0.0
- Initial release.
