fix: add required email and country fields to checkout

- Add email field (required) for order confirmation
- Add phone field in contact info section
- Add country dropdown with regional options
- Add validation for email format and required fields
- Add checkoutEmailUpdate mutation call before completing
- Use selected country instead of hardcoded RS
- Add translations for new fields (EN, SR, DE, FR)
This commit is contained in:
Unchained
2026-03-25 10:50:42 +02:00
parent 4fcd4b3ba8
commit ef83538d0b
5 changed files with 144 additions and 15 deletions

View File

@@ -386,7 +386,12 @@
},
"Checkout": {
"checkout": "Checkout",
"contactInfo": "Contact Information",
"email": "Email",
"emailRequired": "Required for order confirmation",
"phoneRequired": "Required for delivery coordination",
"shippingAddress": "Shipping Address",
"country": "Country",
"firstName": "First Name",
"lastName": "Last Name",
"streetAddress": "Street Address",
@@ -410,6 +415,8 @@
"yourCartEmpty": "Your cart is empty",
"continueShopping": "Continue Shopping",
"errorNoCheckout": "No active checkout. Please try again.",
"errorEmailRequired": "Please enter a valid email address.",
"errorFieldsRequired": "Please fill in all required fields.",
"errorOccurred": "An error occurred during checkout.",
"errorCreatingOrder": "Failed to create order.",
"orderConfirmed": "Order Confirmed!",