=== Unit Converter & Sizing Calculator for Product Pages === Contributors: dreamwell Tags: unit converter, sizing calculator, quantity calculator, product calculator, product specification Requires at least: 5.8 Tested up to: 6.9 Requires PHP: 7.4 Stable tag: 1.1.3 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Add unit converters to product specs and embed sizing calculators that help customers buy the right size and quantity. == Description == Enhance your product pages with inline unit conversion and interactive unit-aware sizing calculators powered by CalcsLive. Makes it easier for customers to choose the right size and quantity before checkout. Help **Reduce support inquiries and product returns**. **Free:** Unit converter shortcodes that let visitors toggle between metric and imperial units in your product specifications—no account required. **Pro:** Embed powerful sizing and quantity calculators from [CalcsLive](https://www.calcslive.com) that guide customers to the right product configuration. = Perfect For = * **E-commerce stores** – AC sizing, concrete quantity, flooring coverage, paint calculators * **Technical products** – Specifications with live unit conversion (mm ↔ inches, kg ↔ lbs) * **Building materials** – "How many bags do I need?" calculators * **Industrial equipment** – Belt sizing, cylinder selection, capacity calculators = Key Features = * **Unit Converter Shortcodes** – Free, no API key needed: `[calcslive_qty value=25 unit="mm"]` * **Calculator Embed** – Embed full calculators: `[calcslive id="YOUR_ID"]` * **Gutenberg Block** – Visual editor with live preview * **Responsive** – Works on desktop, tablet, and mobile * **Lightweight** – Scripts load only on pages that use them = Buying Calculations: Reduce Returns, Increase Confidence = Technical products often require customers to determine **the right size** and **the right quantity** before purchase. Without guidance, they guess—leading to returns, exchanges, and frustration. **Buying Calculations** solve this by embedding pre-purchase calculators directly on product pages: * **Sizing calculators** – Help customers choose correct dimensions, capacity, or fit * **Quantity calculators** – Calculate how many bags, sheets, or units are needed = Create Calculators Without Coding = Traditional product calculators require custom development. CalcsLive changes this: * Create calculation logic using familiar technical data * Turn it into an interactive, unit-aware calculator * Embed on WordPress with a simple shortcode **From days of development to under one hour**—no coding required. Product teams, engineers, or office staff can create and deploy calculators themselves, shifting calculator creation from a development task to a content task. = How It Works = **For unit converters (free, no account):** 1. Add `[calcslive_qty value=25.4 unit="mm"]` to any page 2. Visitors click to convert between compatible units **For embedded calculators:** 1. Create your calculator on [CalcsLive](https://www.calcslive.com) 2. Get your embed API key and article ID 3. Add `[calcslive id="YOUR_ID"]` to your product page 4. Customers use the calculator interactively = Free Tier = Start free with CalcsLive: * 2 embedded calculators * 1 domain * Full calculator functionality * Unit converter shortcodes (unlimited, no account needed) [Get started free](https://www.calcslive.com/auth/register) = Third-Party Service = This plugin relies on the **CalcsLive** external service to display interactive calculations. When an embed is rendered, your visitor's browser loads content directly from CalcsLive via an iframe. **What is sent:** * Your embed API key and domain (included in the iframe URL) * The article ID you specify in the shortcode or block **No visitor data** (such as IP addresses, cookies, or personal information) is collected or sent to CalcsLive by this plugin. The iframe loads in the visitor's browser like any standard embedded content. * CalcsLive website: [calcslive.com](https://www.calcslive.com) * Terms of Service: [calcslive.com/terms](https://www.calcslive.com/terms) * Privacy Policy: [calcslive.com/privacy](https://www.calcslive.com/privacy) == Installation == 1. Upload the plugin files to `/wp-content/plugins/calcslive-article-embed/`, or install directly through the WordPress plugins screen. 2. Activate the plugin through the 'Plugins' screen in WordPress. 3. Use `[calcslive_qty]` shortcodes immediately for inline unit conversion (no API key needed). 4. For embedded calculators: Go to Settings → CalcsLive to configure your API key. 5. Use the `[calcslive id="..."]` shortcode or CalcsLive block to embed calculators. = Unit Converter Shortcodes = No API key needed. These shortcodes render interactive values that visitors can click to convert between units: **Single value:** `[calcslive_qty value=25.4 unit="mm"]` **Value pair (e.g., dimensions):** `[calcslive_qty_pair values="10,20" unit="cm"]` **Value triplet (e.g., L x W x H):** `[calcslive_qty_triplet values="1,2,3" unit="m"]` **Optional attributes:** * `dp` - Decimal places (default: 2) * `show_unit_arrow` - Show/hide unit dropdown arrow (default: true) = Getting Your API Key = 1. Sign up or log in at [CalcsLive](https://www.calcslive.com) 2. Go to Account → API & Integration Settings 3. Create a new API key with service type "Website Embedding" 4. Add your WordPress domain to the allowed domains 5. Copy the API key to your WordPress settings == Frequently Asked Questions == = Where do I get an API key? = You can get an API key from your CalcsLive account at [calcslive.com/account/api-keys](https://www.calcslive.com/account/api-keys). You need to create an embed-type API key and add your WordPress domain. = How do I find my article ID? = The article ID is the short code at the end of your CalcsLive article URL. For example, in `https://www.calcslive.com/view/3M7EJLZQ2-4N5`, the article ID is `3M7EJLZQ2-4N5`. = Can I embed multiple calculators on one page? = Yes! Each article can contain multiple calculations with different namespaces. You can also embed multiple articles on the same page using multiple shortcodes. = Does this work with page builders like Elementor? = Yes, you can use the shortcode `[calcslive id="..."]` in any page builder that supports WordPress shortcodes. = Is this free? = The WordPress plugin is free and open source. CalcsLive offers a free tier with 2 embed pages, or you can upgrade for more pages and domains. = Can customers enter their own values? = Yes! The embedded article is fully interactive. Customers can change input values and units, and the calculations update in real-time. = Do the unit converter shortcodes need an API key? = No. The `[calcslive_qty]`, `[calcslive_qty_pair]`, and `[calcslive_qty_triplet]` shortcodes work entirely client-side with no external service. They use the bundled [physical-quantity](https://www.npmjs.com/package/physical-quantity) web component library. = Where is the source code for the bundled JavaScript? = The `pq.umd.js` file is built from the [physical-quantity](https://www.npmjs.com/package/physical-quantity) npm package (MIT licensed). The source is human-readable and includes version metadata in a banner comment. = What units are supported? = The unit converter supports length, mass, temperature, energy, force, pressure, volume, area, and more. Visitors click the unit dropdown to convert between compatible units (e.g., mm ↔ inches, kg ↔ lbs, °C ↔ °F). == Screenshots == 1. AC Sizing Calculator embedded on a portable air conditioner product page - helps customers choose the right BTU capacity 2. Concrete Mix Calculator on a product page - customers calculate exactly how many bags they need 3. Belt Selection Calculator integrated with Gates A36 product - technical specifications with interactive sizing == Demo Site == See live examples at [cl.donwen.com](https://cl.donwen.com): * [Portable Air Conditioner](https://cl.donwen.com/product/portable-air-conditioner/) - AC sizing calculator * [Concrete Mix](https://cl.donwen.com/product/concrete-mix/) - Quantity calculator * [Gates A36 Belt](https://cl.donwen.com/product/gates-a36/) - Belt selection tool * [Air Cylinder](https://cl.donwen.com/product/mcm-m-series-round-body-air-cylinder/) - Air Cylinder Sizing Calculator == Changelog == = 1.1.3 = * Renamed plugin for better discoverability in WordPress directory * Improved readme with clearer feature descriptions and use cases = 1.1.2 = * Added unit converter shortcodes: `[calcslive_qty]`, `[calcslive_qty_pair]`, `[calcslive_qty_triplet]` = 1.1.1 = * Bundled physical-quantity web component library (v1.1.92) * PQ script loads only on pages using PQ shortcodes = 1.0.1 = * Updated tested WordPress version to 6.9 * Added third-party service disclosure for WP.org compliance * Added languages directory for i18n support = 1.0.0 = * Initial release * Shortcode support: `[calcslive id="..." width="..." height="..."]` * Gutenberg block with live preview * Settings page for API key and default dimensions * Responsive iframe embedding == Upgrade Notice == = 1.1.3 = Renamed plugin for better discoverability. No functional changes. = 1.0.0 = Initial release with calculator embed and Gutenberg block support.