Skip to content

Commit

Permalink
feat: add vat to pricing page, remove monthly subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
vas3k committed Aug 2, 2024
1 parent 46b8512 commit eee0499
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
12 changes: 4 additions & 8 deletions frontend/html/payments/blocks/packages.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<label for="package-year" class="block pay-package">
<div class="pay-package-name">На год</div>
<div class="pay-package-image">🤘</div>
<div class="pay-package-price">€20</div>
<div class="pay-package-price">€20 <small>+ VAT</small></div>
</label>
</div>

Expand All @@ -13,7 +13,7 @@
<label for="package-three" class="block pay-package">
<div class="pay-package-name">На 3 года</div>
<div class="pay-package-image">😎</div>
<div class="pay-package-price">€55</div>
<div class="pay-package-price">€55 <small>+ VAT</small></div>
</label>
</div>

Expand All @@ -22,18 +22,14 @@
<label for="package-hundred" class="block pay-package">
<div class="pay-package-name">На 50 лет</div>
<div class="pay-package-image">🚀</div>
<div class="pay-package-price">€250</div>
<div class="pay-package-price">€250 <small>+ VAT</small></div>
</label>
</div>
</div>

<div class="pay-recurrent">
<label class="block pay-recurrent-block">
<input type="checkbox" name="is_recurrent" value="true" checked>
повторять каждый
<select name="recurrent_interval">
<option value="monthly">месяц</option>
<option value="yearly" selected>год</option>
</select>
повторять каждый год
</label>
</div>
6 changes: 6 additions & 0 deletions frontend/static/css/components/payments.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@
font-size: 120%;
}

.pay-package-price small {
font-size: 50%;
font-weight: 300;
}

.pay-recurrent {
display: block;
padding: 20px;
Expand All @@ -134,6 +139,7 @@
display: inline-block;
font-size: 120%;
padding: 10px 30px;
font-weight: 500;
}

.pay-recurrent-block input[type=checkbox] {
Expand Down
3 changes: 1 addition & 2 deletions payments/views/stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def pay(request):
is_invite = request.GET.get("is_invite")
is_recurrent = request.GET.get("is_recurrent")
if is_recurrent:
interval = request.GET.get("recurrent_interval") or "yearly"
product_code = f"{product_code}_recurrent_{interval}"
product_code = f"{product_code}_recurrent_yearly"

# find product by code
product = PRODUCTS.get(product_code)
Expand Down

0 comments on commit eee0499

Please sign in to comment.