diff --git a/modules/rcart/components/cart.css b/modules/rcart/components/cart.css
index 1c3ac80..7709abf 100644
--- a/modules/rcart/components/cart.css
+++ b/modules/rcart/components/cart.css
@@ -3,3 +3,13 @@ main {
min-height: calc(100vh - 56px);
padding: 0;
}
+
+/* Center narrow form pages (payment request, payment page, group buy) */
+main:has(folk-payment-request),
+main:has(folk-payment-page),
+main:has(folk-group-buy-page) {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
diff --git a/modules/rcart/components/folk-group-buy-page.ts b/modules/rcart/components/folk-group-buy-page.ts
index f2e5c44..fb14518 100644
--- a/modules/rcart/components/folk-group-buy-page.ts
+++ b/modules/rcart/components/folk-group-buy-page.ts
@@ -189,6 +189,12 @@ class FolkGroupBuyPage extends HTMLElement {
const commonsRevenue = simRevenue * (this.commonsSharePct / 100);
const currentCommons = currentRevenue * (this.commonsSharePct / 100);
+ // Overall progress toward max tier (for the fill-up visual)
+ const overallPct = Math.min(100, Math.round((d.totalPledged / maxTierQty) * 100));
+
+ // People SVG icons for social proof
+ const peopleCount = d.pledges?.length || 0;
+
this.shadow.innerHTML = `
@@ -196,18 +202,60 @@ class FolkGroupBuyPage extends HTMLElement {
${d.imageUrl ? `
})
` : ''}
${this.esc(d.title)}
- ${d.productType ? `
${this.esc(d.productType)}` : ''}
- ${d.description ? `
${this.esc(d.description)}
` : ''}
-
+
+
+
+
+
+ ${d.totalPledged}
+ / ${maxTierQty}
+
+ ${d.tiers.map((t: any) => {
+ const tierPct = Math.round((t.min_qty / maxTierQty) * 100);
+ return `
+
+ ${t.min_qty}+
+
`;
+ }).join('')}
+
+
+ ${Array.from({length: Math.min(peopleCount, 8)}, (_, i) =>
+ `
`
+ ).join('')}
+ ${peopleCount > 8 ? `
+${peopleCount - 8}` : ''}
+
+
+
Volume Pricing Tiers
${d.tiers.map((t: any, i: number) => {
@@ -221,19 +269,21 @@ class FolkGroupBuyPage extends HTMLElement {
return `
${t.min_qty}+
$${t.per_unit.toFixed(2)}/ea
- ${savings > 0 ? `-${savings}%` : ``}
+ ${savings > 0 ? `-${savings}%` : `base`}
$${tierCommons.toFixed(0)} commons
- ${reached ? `✓` : this.simQty > 0 && simReached ? `✓` : ''}
+ ${reached ? `✓` : this.simQty > 0 && simReached ? `✓` : ``}
`;
}).join('')}
${nextTier ? `
-
${remaining} more to unlock $${nextTier.per_unit.toFixed(2)}/ea
+
+ ${remaining} more to unlock $${nextTier.per_unit.toFixed(2)}/ea
+ ${d.totalPledged} / ${nextTierQty}
+
-
${d.totalPledged} / ${nextTierQty}
-
` : `
`}
+
` : `
`}
What If...?
@@ -263,7 +313,7 @@ class FolkGroupBuyPage extends HTMLElement {
${simNextTier.min_qty - simTotal} more for $${simNextTier.per_unit.toFixed(2)}/ea
- ` : `
Best tier unlocked!
`}
+ ` : `
🎉 Best tier unlocked!
`}
` : ''}
@@ -297,19 +347,23 @@ class FolkGroupBuyPage extends HTMLElement {
${d.pledges.map((p: any) => `
+ ${this.esc(p.displayName.charAt(0).toUpperCase())}
${this.esc(p.displayName)}
- ${p.quantity}
+ ${p.quantity} unit${p.quantity > 1 ? 's' : ''}
`).join('')}