Pricing flow: model picker first, then model-specific price ranges
deploy / build-and-publish (push) Successful in 40s
deploy / build-and-publish (push) Successful in 40s
- Q0 'Which pricing model would you prefer?' (monthly / annual / per
project radios) gates the four PSM questions; picking a model reveals
question 1 and swaps each question's ranges to that model's set
(switching model clears previous answers)
- ranges: monthly and per-project unchanged (€0/10/25/50/100+); annual
€0/50/150/300/500 (tops at €500 per Keith's gut - to be tested)
- questions reworded model-neutral ('At what price...' instead of
'monthly price')
- analytics: price-model-<model> for the picker, price-<model>-<question>-<option>
per answer; Zoho payload gains price_model plus the usual question=option
pairs
- CMS config: price_models list (key/label/options) + price_model_question;
price_groups simplified to key/heading; preview mirrors the flow
This commit is contained in:
1 parent
f3bdd925d5
commit
7bac903809
5 files changed
+137
-96
No files matched your search
+18
-5
@@ -37,6 +37,8 @@ const css = `
|
||||
.pv-price strong { font-size:0.95rem; }
|
||||
fieldset.pv-pricegroup, .pv-pricegroup { border:0; margin:1.1rem 0 0; padding:0; }
|
||||
.pv-pricegroup legend { font-weight:600; font-size:1rem; margin-bottom:0.4rem; color:var(--ink); }
|
||||
.pv-modelq { font-weight:600; margin:1.4rem 0 0.4rem; }
|
||||
.pv-models { display:flex; gap:0.5rem; flex-wrap:wrap; }
|
||||
.pv-journey ol { list-style:none; padding:0; margin:0.5rem 0 0; display:grid; gap:0.55rem; }
|
||||
.pv-journey li { padding:0.55rem 0.9rem; background:#fff; border:1px solid var(--line); border-inline-start:3px solid var(--accent); border-radius:0.45rem; color:var(--muted); font-size:0.95rem; }
|
||||
.pv-journey li b { color:var(--ink); }
|
||||
@@ -62,6 +64,7 @@ const PagePreview = ({ entry, widgetFor, widgetsFor }) => {
|
||||
const journey = items(widgetsFor("journey"));
|
||||
const caps = items(widgetsFor("capabilities"));
|
||||
const priceGroups = items(widgetsFor("price_groups"));
|
||||
const priceModels = items(widgetsFor("price_models"));
|
||||
const hasHero = d("hero_headline") || d("hero_sub");
|
||||
|
||||
return html`
|
||||
@@ -120,18 +123,28 @@ const PagePreview = ({ entry, widgetFor, widgetsFor }) => {
|
||||
</div>
|
||||
</section>
|
||||
`}
|
||||
${priceGroups.length > 0 &&
|
||||
${(priceGroups.length > 0 && priceModels.length > 0) &&
|
||||
html`
|
||||
<section>
|
||||
<h2>${d("price_title")}</h2>
|
||||
${d("price_note") &&
|
||||
html`<p data-key-path="price_note" tabindex="0">${d("price_note")}</p>`}
|
||||
<p class="pv-modelq">${d("price_model_question")}</p>
|
||||
<div class="pv-models">
|
||||
${priceModels.map((m, i) =>
|
||||
html`<span class="pv-price" data-key-path={"price_models." + i + ".label"} tabindex="0">
|
||||
<span class="tick"></span>
|
||||
<strong>${m.get("label")}</strong>
|
||||
</span>`,
|
||||
)}
|
||||
</div>
|
||||
${priceGroups.map((g, i) => {
|
||||
const opts = Array.from(g.get("options") || []);
|
||||
return html`<fieldset class="pv-pricegroup" data-key-path={`price_groups.${i}.heading`} tabindex="0">
|
||||
const firstModel = priceModels[0];
|
||||
const opts = firstModel ? Array.from(firstModel.get("options") || []) : [];
|
||||
return html`<fieldset class="pv-pricegroup" data-key-path={"price_groups." + i + ".heading"} tabindex="0">
|
||||
<legend>${g.get("heading")}</legend>
|
||||
${opts.map((o, j) =>
|
||||
html`<span class="pv-price" data-key-path={`price_groups.${i}.options.${j}.label`} tabindex="0">
|
||||
html`<span class="pv-price" data-key-path={`price_groups.${i}.heading`} tabindex="0">
|
||||
<span class="tick"></span>
|
||||
<strong>${o.get("label")}</strong>
|
||||
</span>`,
|
||||
@@ -178,7 +191,7 @@ const PagePreview = ({ entry, widgetFor, widgetsFor }) => {
|
||||
valueProps.length === 0 &&
|
||||
journey.length === 0 &&
|
||||
caps.length === 0 &&
|
||||
priceGroups.length === 0 &&
|
||||
priceGroups.length === 0 && priceModels.length === 0 &&
|
||||
!d("pilot_text")) &&
|
||||
html`<p class="pv-empty">No structured sections — the preview shows the body only.</p>`}
|
||||
</main>
|
||||
|
||||
Reference in new issue
Block a user