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:
@@ -266,6 +266,16 @@ def index(request: HttpRequest, category: str | None = None) -> HttpResponse:
|
||||
|
||||
price_filter_action = _build_catalog_url(selected_category.id)
|
||||
|
||||
filters_active = any([
|
||||
search_query,
|
||||
min_price_raw,
|
||||
max_price_raw,
|
||||
filter_sale,
|
||||
filter_new,
|
||||
selected_color_id_raw,
|
||||
])
|
||||
reset_filters_url = _build_catalog_url(selected_category.id, selected_subcategory.id)
|
||||
|
||||
sidebar_sale_items = (
|
||||
Item.objects.filter(discount_price__isnull=False, is_available=True)
|
||||
.prefetch_related('images')
|
||||
@@ -294,6 +304,8 @@ def index(request: HttpRequest, category: str | None = None) -> HttpResponse:
|
||||
'all_items_url': all_items_url,
|
||||
'selected_category_url': selected_category_url,
|
||||
'price_filter_action': price_filter_action,
|
||||
'filters_active': filters_active,
|
||||
'reset_filters_url': reset_filters_url,
|
||||
'current_search_query': search_query,
|
||||
'current_min_price': min_price_raw,
|
||||
'current_max_price': max_price_raw,
|
||||
|
||||
Reference in New Issue
Block a user