feat: update order payment methods and refine profile edit functionality
All checks were successful
Build and Push Docker Image / build (push) Successful in 43s
All checks were successful
Build and Push Docker Image / build (push) Successful in 43s
- Replaced `Order.PaymentMethod` options with "cash" and "card" while adjusting related code and templates - Set "cash" as the default payment method for orders and checkout forms - Added profile editing functionality with `ProfileForm`, allowing users to update names - Improved feedback messages across profile and order management templates - Updated catalog to handle empty filter results with a "reset filters" option
This commit is contained in:
@@ -112,11 +112,11 @@
|
||||
<legend>СПОСОБ ДОСТАВКИ</legend>
|
||||
<div class="checkout-options checkout-options--two">
|
||||
<label class="checkout-radio">
|
||||
<input type="radio" name="delivery_method" value="courier" {% if checkout_form.delivery_method.value == "courier" or not checkout_form.is_bound %}checked{% endif %}>
|
||||
<input type="radio" name="delivery_method" value="courier" required {% if checkout_form.delivery_method.value == "courier" or not checkout_form.is_bound %}checked{% endif %}>
|
||||
<span>Курьерская доставка</span>
|
||||
</label>
|
||||
<label class="checkout-radio">
|
||||
<input type="radio" name="delivery_method" value="pickup" {% if checkout_form.delivery_method.value == "pickup" %}checked{% endif %}>
|
||||
<input type="radio" name="delivery_method" value="pickup" required {% if checkout_form.delivery_method.value == "pickup" %}checked{% endif %}>
|
||||
<span>Самовывоз</span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -141,18 +141,14 @@
|
||||
|
||||
<fieldset class="checkout-fieldset">
|
||||
<legend>СПОСОБ ОПЛАТЫ</legend>
|
||||
<div class="checkout-options checkout-options--three">
|
||||
<div class="checkout-options checkout-options--two">
|
||||
<label class="checkout-radio">
|
||||
<input type="radio" name="payment_method" value="card" {% if checkout_form.payment_method.value == "card" or not checkout_form.is_bound %}checked{% endif %}>
|
||||
<span>Банковская карта</span>
|
||||
<input type="radio" name="payment_method" value="cash" required {% if checkout_form.payment_method.value == "cash" or not checkout_form.is_bound %}checked{% endif %}>
|
||||
<span>Наличкой при получении</span>
|
||||
</label>
|
||||
<label class="checkout-radio">
|
||||
<input type="radio" name="payment_method" value="credit" {% if checkout_form.payment_method.value == "credit" %}checked{% endif %}>
|
||||
<span>Кредит</span>
|
||||
</label>
|
||||
<label class="checkout-radio">
|
||||
<input type="radio" name="payment_method" value="installment" {% if checkout_form.payment_method.value == "installment" %}checked{% endif %}>
|
||||
<span>Рассрочка</span>
|
||||
<input type="radio" name="payment_method" value="card" required {% if checkout_form.payment_method.value == "card" %}checked{% endif %}>
|
||||
<span>Картой при получении</span>
|
||||
</label>
|
||||
</div>
|
||||
{% for error in checkout_form.payment_method.errors %}<p class="field-error">{{ error }}</p>{% endfor %}
|
||||
@@ -163,15 +159,15 @@
|
||||
<div class="checkout-grid checkout-grid--contacts">
|
||||
<label class="checkout-input checkout-input--wide">
|
||||
<span>ФИО*</span>
|
||||
<input type="text" name="customer_name" value="{{ checkout_form.customer_name.value|default:'' }}" placeholder="ФИО*" autocomplete="name">
|
||||
<input type="text" name="customer_name" value="{{ checkout_form.customer_name.value|default:'' }}" placeholder="ФИО*" autocomplete="name" required>
|
||||
</label>
|
||||
<label class="checkout-input">
|
||||
<span>Телефон*</span>
|
||||
<input type="tel" name="phone" value="{{ checkout_form.phone.value|default:'' }}" placeholder="Телефон*" autocomplete="tel">
|
||||
<input type="tel" name="phone" value="{{ checkout_form.phone.value|default:'' }}" placeholder="Телефон*" autocomplete="tel" inputmode="tel" pattern="\+?[\d\s\-()]{7,20}" required>
|
||||
</label>
|
||||
<label class="checkout-input">
|
||||
<span>E-mail*</span>
|
||||
<input type="email" name="email" value="{{ checkout_form.email.value|default:'' }}" placeholder="E-mail*" autocomplete="email">
|
||||
<input type="email" name="email" value="{{ checkout_form.email.value|default:'' }}" placeholder="E-mail*" autocomplete="email" required>
|
||||
</label>
|
||||
</div>
|
||||
{% for error in checkout_form.customer_name.errors %}<p class="field-error">{{ error }}</p>{% endfor %}
|
||||
@@ -201,7 +197,7 @@
|
||||
<button class="checkout-submit" type="submit">ОФОРМИТЬ ЗАКАЗ</button>
|
||||
|
||||
<label class="checkout-checkbox checkout-checkbox--terms">
|
||||
<input type="checkbox" name="terms_accepted" value="on" {% if checkout_form.terms_accepted.value %}checked{% endif %}>
|
||||
<input type="checkbox" name="terms_accepted" value="on" required {% if checkout_form.terms_accepted.value %}checked{% endif %}>
|
||||
<span>Согласен с условиями продажи, оплаты и возврата</span>
|
||||
</label>
|
||||
{% for error in checkout_form.terms_accepted.errors %}<p class="field-error">{{ error }}</p>{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user