Pablo MeasureCart – Universal Unit Sales

Description

Pablo MeasureCart replaces standard loop add-to-cart buttons with a fixed plus/minus interface across WooCommerce product views.

Each product provides five complete, independently enabled sale-option slots. Every slot includes:

  • Unit type or a custom unit name.
  • Base quantity, such as 0.5 kg.
  • Price for the base quantity.
  • Minimum quantity.
  • Plus/minus step.
  • Starting quantity.
  • Maximum quantity.

The storefront displays the price per configured base quantity and a live total. For example, a product configured as $10 per 0.5 kg displays a total of $30 when the cart quantity reaches 1.5 kg.

The plugin also provides:

  • Plus/minus controls on shop loops, product archives, related products, upsells, cross-sells, supported product blocks, single products, mini-cart, and cart pages.
  • Grid and table layouts on the shop, product taxonomies, and product searches.
  • A persistent top cart and side cart.
  • Taxonomy-based product badges for every relevant product label.
  • Administrator-selected fields for grid cards and table columns.
  • Optional responsive table rows that expose extra fields through an accessible plus button.
  • Decimal quantity validation for classic WooCommerce and the Store API.
  • Bundled readable local styling and storefront behavior with structured settings only.

Two focused MeasureCart administration screens configure grid fields and table fields. Every selectable field is predefined, validated and available directly to the administrator.

Source code

The human-readable frontend JavaScript source is included at assets/js/frontend.src.js. The runtime file assets/js/frontend.js is also readable and is generated by copying the source file without minification or transformation. No build tools are required.

Screenshots

Installation

  1. Upload the plugin ZIP through Plugins Add New Upload Plugin.
  2. Activate Pablo MeasureCart.
  3. Edit a WooCommerce product and open the MeasureCart units tab.
  4. Enable the sale-option slots needed for the product and enter each slot’s quantity and price rules.
  5. Create badges under Products Product badges, then assign the relevant badges in the product editor.
  6. Open MeasureCart Grid display and MeasureCart Table display to configure the storefront.

FAQ

Does the plugin redirect customers to the product page after clicking plus?

No. Supported simple products and resolved variations are updated by a nonce-protected local AJAX request while the customer remains on the current page.

How is a price such as $10 per 0.5 kg calculated?

The plugin stores $10 as the price for the configured base quantity of 0.5 kg. WooCommerce receives the equivalent per-one-unit rate, so 1.5 kg totals $30.

Can a product have more than one sale option?

Yes. Five complete slots are available and any unused slots can remain unchecked.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Pablo MeasureCart – Universal Unit Sales” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.2.5

  • Fixed the Table switch and retained normal server-side links as a complete fallback.
  • Added separate responsive Grid display and Table display administration screens.
  • Added allowlisted field selection for grid cards and table columns.
  • Added optional expandable table rows when selected columns exceed the available width.
  • Moved the single-product quantity selector below the product image and above sale-unit selection.
  • Added a dedicated local asset revision to prevent stale cached JavaScript after the table fix.
  • Kept all PHP, JavaScript, and CSS human-readable and local, with predefined settings only.

1.2.4

  • Fixed literal WooCommerce currency entities such as   and ₪ in live price summaries.
  • Display the configured starting quantity and its total before a product is added to the cart.
  • Keep the real cart quantity separate from the pre-add starting-quantity preview.

1.2.3

  • Added assets/js/frontend.src.js as an explicit human-readable source counterpart for the runtime frontend script.
  • Documented that the runtime frontend script is copied from the source without minification or transformation.
  • Replaced slice-based sale-option processing with an explicit five-slot public schema.
  • Improved badge assignment and product-block control loading.
  • Expanded grid-column choices from one through twelve using predefined layouts.
  • Reconfirmed that every supported unit type and pricing field is directly available in the editor.

1.2.1

  • Changed sale-option hover, keyboard-focus, and selected states to a fixed dark-blue background with white text.
  • Shortened the WordPress.org short description to remain below 150 characters.
  • Removed readme wording that could be mistaken for a source-code input feature.
  • Removed the redundant WooCommerce dependency notice and rely on the Requires Plugins header.
  • Retained nonce verification for public cart AJAX while making the action registration clearer to static scanners.
  • Removed a redundant capability termination from the protected settings-page callback.

1.2.0

  • Added five complete independently enabled sale-option slots per product.
  • Added base quantity and base price fields with live unit-price and total displays.
  • Added separate cart lines and prices for different sale options of the same product.
  • Removed all plus-button navigation to product pages.
  • Added taxonomy-based product badges and badge catalog filters.
  • Added badges to grid, table, classic loops, blocks, and single-product displays.
  • Preserved readable, non-minified local CSS and JavaScript.

1.1.1

  • Removed the dependency on an unavailable catalog-ordering helper.
  • Reused WooCommerce’s native archive query and ordering output.
  • Corrected input sanitization and prefixed uninstall variables.