fix: missing email on order creation
This commit is contained in:
@@ -12,30 +12,12 @@
|
|||||||
{% translate 'Mis pedidos' %}
|
{% translate 'Mis pedidos' %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<a href="#" title=""
|
|
||||||
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600">
|
|
||||||
{% translate 'Ajustes' %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'web:wishlist' %}" title=""
|
<a href="{% url 'web:wishlist' %}" title=""
|
||||||
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600">
|
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600">
|
||||||
{% translate 'Lista de deseados' %}
|
{% translate 'Lista de deseados' %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<a href="#" title=""
|
|
||||||
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600">
|
|
||||||
{% translate 'Direcciones de envío' %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" title=""
|
|
||||||
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600">
|
|
||||||
{% translate 'Métodos de pago' %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="p-2 text-sm font-medium text-gray-900 dark:text-white">
|
<div class="p-2 text-sm font-medium text-gray-900 dark:text-white">
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
<span class="bg-green-100 text-green-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded dark:bg-green-900 dark:text-green-300 ml-3">{% trans 'Pagado' %}</span>
|
<span class="bg-green-100 text-green-800 text-sm font-medium me-2 px-2.5 py-0.5 rounded dark:bg-green-900 dark:text-green-300 ml-3">{% trans 'Pagado' %}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="mt-4 sm:mt-6 md:gap-6 lg:flex lg:items-start xl:gap-8">
|
<div class="mt-4 sm:mt-6 md:gap-6 lg:flex lg:items-start xl:gap-8">
|
||||||
<div class="mx-auto w-full flex-none lg:max-w-2xl xl:max-w-4xl">
|
<div class="mx-auto w-full flex-none lg:max-w-2xl xl:max-w-4xl">
|
||||||
<div class="space-y-6">
|
<div class="space-y-6">
|
||||||
@@ -32,7 +33,7 @@
|
|||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<span
|
<span
|
||||||
class="w-10 shrink-0 border-0 bg-transparent text-center text-sm font-medium text-gray-900 focus:outline-none focus:ring-0 dark:text-white">
|
class="w-10 shrink-0 border-0 bg-transparent text-center text-sm font-medium text-gray-900 focus:outline-none focus:ring-0 dark:text-white">
|
||||||
{{ item.quantity }}x
|
{{ item.quantity|floatformat }}x
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-end md:order-4 md:w-32">
|
<div class="text-end md:order-4 md:w-32">
|
||||||
@@ -53,6 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if items.count == 0 %}
|
{% if items.count == 0 %}
|
||||||
@@ -73,11 +75,12 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p>{{ order.shipping_address }}</p>
|
<p class="text-m text-gray-900 dark:text-white">{{ order.email }}</p>
|
||||||
<p>{{ order.shipping_city }}</p>
|
<p class="text-m text-gray-900 dark:text-white">{{ order.shipping_address }}</p>
|
||||||
<p>{{ order.shipping_state }}</p>
|
<p class="text-m text-gray-900 dark:text-white">{{ order.shipping_city }}</p>
|
||||||
<p>{{ order.shipping_country }}</p>
|
<p class="text-m text-gray-900 dark:text-white">{{ order.shipping_state }}</p>
|
||||||
<p>{{ order.shipping_zip }}</p>
|
<p class="text-m text-gray-900 dark:text-white">{{ order.shipping_country }}</p>
|
||||||
|
<p class="text-m text-gray-900 dark:text-white">{{ order.shipping_zip }}</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -87,11 +90,11 @@
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p>{{ order.billing_address }}</p>
|
<p class="text-m text-gray-900 dark:text-white">{{ order.billing_address }}</p>
|
||||||
<p>{{ order.billing_city }}</p>
|
<p class="text-m text-gray-900 dark:text-white">{{ order.billing_city }}</p>
|
||||||
<p>{{ order.billing_state }}</p>
|
<p class="text-m text-gray-900 dark:text-white">{{ order.billing_state }}</p>
|
||||||
<p>{{ order.billing_country }}</p>
|
<p class="text-m text-gray-900 dark:text-white">{{ order.billing_country }}</p>
|
||||||
<p>{{ order.billing_zip }}</p>
|
<p class="text-m text-gray-900 dark:text-white">{{ order.billing_zip }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
@@ -101,9 +104,7 @@
|
|||||||
{% translate 'Método de envío' %}
|
{% translate 'Método de envío' %}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<section>
|
<p class="text-m text-gray-900 dark:text-white">{{ order.shipping_method.name }}</p>
|
||||||
{{ order.shipping_method.name }}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@@ -180,12 +181,9 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -110,6 +110,8 @@ class CartDetail(TemplateView, CreateView):
|
|||||||
shipping_address_zip = form.cleaned_data.get("shipping_address_zip")
|
shipping_address_zip = form.cleaned_data.get("shipping_address_zip")
|
||||||
shipping_address_phone = form.cleaned_data.get("shipping_address_phone")
|
shipping_address_phone = form.cleaned_data.get("shipping_address_phone")
|
||||||
|
|
||||||
|
email = form.cleaned_data.get("email")
|
||||||
|
|
||||||
shipping_method = get_object_or_404(ShippingMethod, pk=shipping_method_id)
|
shipping_method = get_object_or_404(ShippingMethod, pk=shipping_method_id)
|
||||||
|
|
||||||
order = create_order_from_cart(
|
order = create_order_from_cart(
|
||||||
@@ -128,6 +130,7 @@ class CartDetail(TemplateView, CreateView):
|
|||||||
shipping_address_country=shipping_address_country,
|
shipping_address_country=shipping_address_country,
|
||||||
shipping_address_zip=shipping_address_zip,
|
shipping_address_zip=shipping_address_zip,
|
||||||
shipping_address_phone=shipping_address_phone,
|
shipping_address_phone=shipping_address_phone,
|
||||||
|
email=email,
|
||||||
)
|
)
|
||||||
|
|
||||||
return redirect(reverse("web:order", kwargs={"uuid": order.uuid}))
|
return redirect(reverse("web:order", kwargs={"uuid": order.uuid}))
|
||||||
|
|||||||
Reference in New Issue
Block a user