| 开发者 | idsources |
|---|---|
| 更新时间 | 2026年9月29日 00:46 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
[ids_floorcalc id="123"] shortcode for placing a product calculator in a page or post.your-theme/ids-areamiq/calculator.php, with the legacy ids-floorcalc path retained.ids-areamiq folder to /wp-content/plugins/, or upload the plugin ZIP through Plugins → Add New → Upload Plugin.The customer enters an area or length × width. IDS Areamiq applies the configured waste allowance, divides the adjusted area by the effective coverage per unit, rounds up to whole units and respects the configured minimum quantity.
Yes. Each product can use area-only purchasing, direct whole-unit purchasing, or allow the customer to choose either method.
Bag mode uses the configured reference thickness. Effective coverage scales inversely when the customer chooses a different layer thickness.
The calculator supports simple and variable product pages, with calculator configuration stored on the parent product. Automatic price-per-m² conversion is limited to supported simple products; variations continue to use their normal WooCommerce prices.
Yes. Copy templates/calculator.php to your-theme/ids-areamiq/calculator.php and customise the copy. The legacy your-theme/ids-floorcalc/calculator.php path remains supported.
The following describes the Free 1.2.0 release preparation, not a publication announcement or confirmation that the final package audit has passed. The repository guide at docs/free-theming-and-plank-dimensions.md contains the full contracts and examples; it is repository documentation, not a bundled plugin file.
Template lookup checks child ids-areamiq/calculator.php, parent ids-areamiq/calculator.php, child ids-floorcalc/calculator.php, then parent ids-floorcalc/calculator.php, with templates/calculator.php as the bundled fallback. A preferred parent override therefore precedes a legacy child override. With no child theme, only the active theme is checked for each path. If the first located override is invalid or unreadable, resolution falls back to the bundle rather than continuing through other theme candidates.
The filter ids_floorcalc_calculator_template_path receives the resolved path and the product (WC_Product, or null when unavailable). Return a readable local file with a .php extension. Malformed values, missing/unreadable files, directories and stream wrappers are rejected, retaining the valid unfiltered path. If there is no valid unfiltered path, no template is rendered and the filter is not called. Never construct an include path from customer input.
The bundled template has @version 1.2.0. System Status compares the bundled and default theme-override headers only, before the path filter; it does not assess product-dependent filtered templates. Missing, malformed or unreadable versions are unknown. Matching versions do not guarantee behavioural compatibility. Preserve template variables, classes, data attributes, form fields, unique per-instance IDs, labels, keyboard controls and the persistent result announcement when customising.
Optional thickness, width and length describe an individual board, not its shipping carton. Store them on the ordinary product or variable-product parent; variations inherit the parent's data. Values must be greater than zero and at most 100000, with up to three decimal places; decimal comma is accepted. Units are exactly mm, cm or in, without conversion. Missing or invalid stored dimensions are omitted; an absent or invalid display unit defaults to mm without saving that default.
Mixed Length displays the translated word Mixed instead of numeric length, retaining any stored numeric length. The row uses locale-formatted numbers without unnecessary trailing zeros. Missing dimensions are omitted; when none remain, the row and its icons disappear. A unit alone does not create a row. The product editor reads stored values, not integration display overrides: blanks delete, while invalid fields retain their saved values and report an error.
Plank dimensions are informational only: they do not affect coverage, waste, price or quantity. Plank thickness is separate from reference/application thickness used in bag calculations. No plank data is added to cart/order data, sharing or Embed.
The existing 16 columns retain their order, followed by plank_thickness, plank_width, plank_length, plank_length_mixed, plank_unit. An omitted column or missing trailing cell preserves that value; an explicit blank (including whitespace) deletes it. Existing 1.1.0 CSV files remain importable without changing plank data. Mixed Length accepts lowercase yes/true/1 (stores yes) and no/false/0 or blank (deletes). Units are mm/cm/in; CSV cell whitespace is trimmed. Quote decimal commas, for example "14,125".
An invalid plank cell rejects the row before its product writes and reports a row/column error. Any supplied plank cell, even blank, rejects a variation row. This does not make all CSV errors atomic: invalid mode/purchase-method or later pricing errors can coexist with writes to other fields. There is no transaction or rollback guarantee. Review import errors and back up data before bulk updates.
Export uses persisted plank metadata, not display filters or default units. Missing/corrupt values export blank; mixed true exports yes. Plank decimals use a point, no grouping and no redundant zeros. The format is comma-separated UTF-8 with a BOM, double-quoted cells where required and doubled embedded quotes, not backslash escaping. Existing text-cell formula protection is retained. The repository guide includes the complete 21-column example.
Yes, within the existing CSS surface. Set properties directly on a suitably scoped .ids-floorcalc element, with rules that win the cascade; setting them only on an outer wrapper may be overridden by the calculator's own defaults. Examples are --ids-floorcalc-accent, --ids-floorcalc-accent-soft, --ids-floorcalc-text, --ids-floorcalc-surface and --ids-floorcalc-radius. The repository guide lists defined, consumed storefront properties and their defaults. These use the existing scoped internal fallbacks; private --fc-* tokens are not a new public API. This is not a promise that every visual detail is customisable, nor a way to style a separate Embed iframe from the parent page.
Use [ids_floorcalc id="123"], replacing 123 with the WooCommerce product ID.
Yes. Enable the Free Embed feature and use IDS Areamiq → Embed to generate an iframe snippet. Embed settings can restrict which domains may frame the calculator.