ROI Calculator
ROI Calculator for Concrete CMS: an interactive calculator block with configurable parameters, formulas, and results. Supports multiple instances per page, a clean two-column results grid, tooltips, translations, and modern templates.
ROI Calculator — Description
The ROI Calculator block lets editors model business metrics—Orders, Revenue, ROAS, CPA, ROI%—directly on a page. Define inputs (visitors, conversion rate, AOV) and compute results using formulas that reference variable keys or {{Display Name}}
. Results update live or on Calculate. Each block instance is isolated, so multiple calculators can be used on the same page.
Highlights
- Flexible inputs: name, unit, key, min/max/step/default; field types Input, Slider, Hidden
- Powerful results: formulas with
+ - * / ( )
; use keys or{{Display Name}}
;round()
supported - Help tooltips (info icon): Bootstrap 5
- Two-column results grid with consistent spacing (tweak in
view.css
) - Multi-instance safe (unique IDs/selectors)
- Templates included: Default, Modern, Neo
- i18n-ready:
.po/.mo
structure - Robust examples to avoid divide-by-zero
Common Use Cases
- Marketing ROI simulations and budget scenarios
- E-commerce KPIs: Orders, AOV, Margin, ROAS, CPA
- SaaS funnels: Leads → Trials → Subs, ARPA/LTV/CAC/Payback
- Pricing, break-even, and project calculators
Technical Notes
- Compatibility: Concrete CMS 9+; Bootstrap 5 (tooltips)
- Styling: adjust gaps, tooltip width, and colors in
view.css
- Templates:
blocks/cs_roi_calculator/templates/{default,modern,neo}
- Security: tooltip HTML sanitized; attributes escaped
Requirements
- Concrete CMS v9 or newer
- Theme loads Bootstrap 5 JS (tooltips) and Font Awesome (info icon)
- PHP 7.4+ or 8.x
Installation and Usage
- Install and activate the add-on.
- Add the ROI Calculator block to a page.
- Configure Parameters (inputs) and Results (formulas).
- Optionally add Help text to show a tooltip icon.
- Choose a template, save.
Notes
- Rounding to two decimals:
round(expr * 100) / 100
- Avoid divide-by-zero:
denom == 0 ? 0 : expr