Spaces:
Sleeping
Sleeping
Update templates/cart.html
Browse files- templates/cart.html +34 -28
templates/cart.html
CHANGED
|
@@ -119,34 +119,35 @@
|
|
| 119 |
|
| 120 |
<h4 class="mb-4">Your Cart</h4>
|
| 121 |
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
|
|
|
| 150 |
{% else %}
|
| 151 |
<p class="text-center">Your cart is empty.</p>
|
| 152 |
{% endfor %}
|
|
@@ -191,6 +192,11 @@
|
|
| 191 |
</div>
|
| 192 |
</div>
|
| 193 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
|
| 195 |
<script>
|
| 196 |
// Example function to handle the increase/decrease button clicks
|
|
|
|
| 119 |
|
| 120 |
<h4 class="mb-4">Your Cart</h4>
|
| 121 |
|
| 122 |
+
<!-- Cart Items -->
|
| 123 |
+
{% for item in cart_items %}
|
| 124 |
+
<div class="cart-item">
|
| 125 |
+
<img src="{{ item.Image1__c }}" alt="{{ item.Name }}" onerror="this.src='/static/placeholder.jpg';">
|
| 126 |
+
<div class="cart-item-details">
|
| 127 |
+
<div class="cart-item-title">{{ item.Name }}</div>
|
| 128 |
+
<div class="cart-item-addons">
|
| 129 |
+
<small class="text-muted">Add-ons: {{ item.Add_Ons__c }}</small>
|
| 130 |
+
</div>
|
| 131 |
+
<div class="cart-item-instructions">
|
| 132 |
+
<small class="text-muted">Instructions: {{ item.Instructions__c or "None" }}</small>
|
| 133 |
+
</div>
|
| 134 |
+
<div class="cart-item-quantity mt-2">
|
| 135 |
+
<!-- Decrease button -->
|
| 136 |
+
<button onclick="updateQuantity('decrease', '{{ item.Name }}', '{{ customer_email }}')">-</button>
|
| 137 |
+
<!-- Quantity input field -->
|
| 138 |
+
<input type="text" value="{{ item.Quantity__c }}" readonly data-item-name="{{ item.Name }}">
|
| 139 |
+
<!-- Increase button -->
|
| 140 |
+
<button onclick="updateQuantity('increase', '{{ item.Name }}', '{{ customer_email }}')">+</button>
|
| 141 |
+
</div>
|
| 142 |
+
</div>
|
| 143 |
+
<div class="cart-item-actions">
|
| 144 |
+
<div class="text-primary">
|
| 145 |
+
$<span class="base-price">{{ item.Price__c }}</span>
|
| 146 |
+
</div>
|
| 147 |
+
<button class="btn btn-danger btn-sm" onclick="removeItemFromCart('{{ item.Name }}')">Remove</button>
|
| 148 |
+
</div>
|
| 149 |
+
</div>
|
| 150 |
+
|
| 151 |
{% else %}
|
| 152 |
<p class="text-center">Your cart is empty.</p>
|
| 153 |
{% endfor %}
|
|
|
|
| 192 |
</div>
|
| 193 |
</div>
|
| 194 |
</div>
|
| 195 |
+
<div class="cart-item">
|
| 196 |
+
<img src="{{ item.image }}" alt="{{ item.name }}" />
|
| 197 |
+
<div>{{ item.name }}</div>
|
| 198 |
+
<div>{{ item.price }} x {{ item.quantity }}</div> <!-- Display quantity here -->
|
| 199 |
+
</div>
|
| 200 |
|
| 201 |
<script>
|
| 202 |
// Example function to handle the increase/decrease button clicks
|