feat: cart
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{% load i18n %}
|
||||
<form action="" hx-post="{% url 'web:add_cart_item' %}" hx-swap="none">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="product" value="{{ product.pk }}">
|
||||
<input id="quantity" type="hidden" name="quantity" value="1">
|
||||
<button
|
||||
class="inline-flex items-center rounded-lg bg-primary-700 px-5 py-2.5 text-sm font-medium text-white hover:bg-primary-800 focus:outline-none focus:ring-4 focus:ring-primary-300 dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800">
|
||||
<svg class="-ms-2 me-2 h-5 w-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24"
|
||||
height="24" fill="none" viewBox="0 0 24 24">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M4 4h1.5L8 16m0 0h8m-8 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm8 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm.75-3H7.5M11 7H6.312M17 4v6m-3-3h6"/>
|
||||
</svg>
|
||||
{% translate 'Añadir al carrito' %}
|
||||
</button>
|
||||
</form>
|
||||
Reference in New Issue
Block a user