| 1 |
{% include "wizards/partials/step_nav.html" %} |
| 2 |
|
| 3 |
<div class="wizard-step"> |
| 4 |
<h2 class="subtitle-h2">Pricing</h2> |
| 5 |
<p class="step-description">How much should this item cost? 0% platform fee — only ~3% payment processing fee.</p> |
| 6 |
|
| 7 |
<form hx-post="/dashboard/project/{{ project_slug }}/new-item/{{ item_id }}/step/pricing" |
| 8 |
hx-target="#wizard-step" hx-swap="innerHTML" |
| 9 |
hx-push-url="/dashboard/project/{{ project_slug }}/new-item/{{ item_id }}/step/preview" |
| 10 |
novalidate> |
| 11 |
|
| 12 |
<div class="pricing-cards"> |
| 13 |
<label class="pricing-card"> |
| 14 |
<input type="radio" name="pricing_model" value="free" |
| 15 |
{% if pricing_model == "free" %}checked{% endif %} |
| 16 |
onchange="updatePricingFields()"> |
| 17 |
<span class="pricing-card-inner"> |
| 18 |
<span class="pricing-card-label">Free</span> |
| 19 |
<span class="pricing-card-desc">No charge. Available to everyone.</span> |
| 20 |
</span> |
| 21 |
</label> |
| 22 |
|
| 23 |
<label class="pricing-card"> |
| 24 |
<input type="radio" name="pricing_model" value="fixed" |
| 25 |
{% if pricing_model == "fixed" %}checked{% endif %} |
| 26 |
onchange="updatePricingFields()"> |
| 27 |
<span class="pricing-card-inner"> |
| 28 |
<span class="pricing-card-label">One-Time Purchase</span> |
| 29 |
<span class="pricing-card-desc">Set a specific price for this item.</span> |
| 30 |
</span> |
| 31 |
</label> |
| 32 |
|
| 33 |
<label class="pricing-card"> |
| 34 |
<input type="radio" name="pricing_model" value="pwyw" |
| 35 |
{% if pricing_model == "pwyw" %}checked{% endif %} |
| 36 |
onchange="updatePricingFields()"> |
| 37 |
<span class="pricing-card-inner"> |
| 38 |
<span class="pricing-card-label">Pay What You Want</span> |
| 39 |
<span class="pricing-card-desc">Buyers choose their price above a minimum.</span> |
| 40 |
</span> |
| 41 |
</label> |
| 42 |
</div> |
| 43 |
|
| 44 |
<div id="pricing-fields-fixed" class="pricing-fields {% if pricing_model != "fixed" %}hidden{% endif %}"> |
| 45 |
<div class="form-group"> |
| 46 |
<label for="wiz-price">Price ($)</label> |
| 47 |
<input type="number" id="wiz-price" name="price" min="0.50" step="0.01" |
| 48 |
value="{{ price_dollars }}" placeholder="5.00"> |
| 49 |
</div> |
| 50 |
</div> |
| 51 |
|
| 52 |
<div id="pricing-fields-pwyw" class="pricing-fields {% if pricing_model != "pwyw" %}hidden{% endif %}"> |
| 53 |
<div class="form-group"> |
| 54 |
<label for="wiz-suggested">Suggested Price ($)</label> |
| 55 |
<input type="number" id="wiz-suggested" name="suggested_price" min="0" step="0.01" |
| 56 |
value="{{ pwyw_suggested_dollars }}" placeholder="10.00"> |
| 57 |
</div> |
| 58 |
<div class="form-group"> |
| 59 |
<label for="wiz-min">Minimum Price ($)</label> |
| 60 |
<input type="number" id="wiz-min" name="min_price" min="0" step="0.01" |
| 61 |
value="{{ pwyw_min_dollars }}" placeholder="0.00"> |
| 62 |
<div class="hint">Set to 0 to allow free downloads.</div> |
| 63 |
</div> |
| 64 |
</div> |
| 65 |
|
| 66 |
<div class="wizard-actions"> |
| 67 |
<button type="button" class="btn-secondary" |
| 68 |
hx-get="/dashboard/project/{{ project_slug }}/new-item/{{ item_id }}/step/content" |
| 69 |
hx-target="#wizard-step" hx-swap="innerHTML" |
| 70 |
hx-push-url="/dashboard/project/{{ project_slug }}/new-item/{{ item_id }}/step/content">Back</button> |
| 71 |
<button type="submit" class="btn-primary">Continue</button> |
| 72 |
</div> |
| 73 |
</form> |
| 74 |
</div> |
| 75 |
|
| 76 |
<script> |
| 77 |
function updatePricingFields() { |
| 78 |
var model = document.querySelector('input[name="pricing_model"]:checked'); |
| 79 |
if (!model) return; |
| 80 |
var val = model.value; |
| 81 |
document.getElementById('pricing-fields-fixed').style.display = val === 'fixed' ? '' : 'none'; |
| 82 |
document.getElementById('pricing-fields-pwyw').style.display = val === 'pwyw' ? '' : 'none'; |
| 83 |
} |
| 84 |
</script> |
| 85 |
|