Spaces:
Sleeping
Sleeping
Update templates/cart.html
Browse files- templates/cart.html +16 -9
templates/cart.html
CHANGED
@@ -29,7 +29,7 @@
|
|
29 |
}
|
30 |
.cart-item {
|
31 |
display: flex;
|
32 |
-
align-items:
|
33 |
justify-content: space-between;
|
34 |
border-bottom: 1px solid #e0e0e0;
|
35 |
padding: 15px 0;
|
@@ -40,6 +40,7 @@
|
|
40 |
object-fit: cover;
|
41 |
border-radius: 8px;
|
42 |
transition: transform 0.3s;
|
|
|
43 |
}
|
44 |
.cart-item img:hover {
|
45 |
transform: scale(1.05);
|
@@ -127,6 +128,13 @@
|
|
127 |
object-fit: cover;
|
128 |
border-radius: 5px;
|
129 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
</style>
|
131 |
</head>
|
132 |
<body>
|
@@ -143,7 +151,10 @@
|
|
143 |
<div class="cart-item">
|
144 |
<img src="{{ item.Image1__c }}" alt="{{ item.Name }}" onerror="this.src='/static/placeholder.jpg';">
|
145 |
<div class="cart-item-details">
|
146 |
-
<div class="cart-item-title">
|
|
|
|
|
|
|
147 |
<div class="cart-item-addons">
|
148 |
<small class="text-muted">Add-ons: {{ item.Add_Ons__c }}</small>
|
149 |
</div>
|
@@ -151,19 +162,15 @@
|
|
151 |
<small class="text-muted">Instructions: {{ item.Instructions__c or "None" }}</small>
|
152 |
</div>
|
153 |
<div class="cart-item-quantity mt-2">
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
<input type="text" value="{{ item.Quantity__c|int }}" readonly data-item-name="{{ item.Name }}">
|
158 |
-
<!-- Increase button -->
|
159 |
-
<button onclick="updateQuantity('increase', '{{ item.Name }}', '{{ customer_email }}')">+</button>
|
160 |
</div>
|
161 |
</div>
|
162 |
<div class="cart-item-actions">
|
163 |
<div class="text-primary">
|
164 |
$<span class="base-price">{{ item.Price__c }}</span>
|
165 |
</div>
|
166 |
-
<button class="btn btn-danger btn-sm" onclick="removeItemFromCart('{{ item.Name }}')">Remove</button>
|
167 |
</div>
|
168 |
</div>
|
169 |
{% else %}
|
|
|
29 |
}
|
30 |
.cart-item {
|
31 |
display: flex;
|
32 |
+
align-items: flex-start;
|
33 |
justify-content: space-between;
|
34 |
border-bottom: 1px solid #e0e0e0;
|
35 |
padding: 15px 0;
|
|
|
40 |
object-fit: cover;
|
41 |
border-radius: 8px;
|
42 |
transition: transform 0.3s;
|
43 |
+
margin-bottom: 10px;
|
44 |
}
|
45 |
.cart-item img:hover {
|
46 |
transform: scale(1.05);
|
|
|
128 |
object-fit: cover;
|
129 |
border-radius: 5px;
|
130 |
}
|
131 |
+
.remove-icon {
|
132 |
+
border: none;
|
133 |
+
background: none;
|
134 |
+
color: red;
|
135 |
+
font-size: 1.2rem;
|
136 |
+
cursor: pointer;
|
137 |
+
}
|
138 |
</style>
|
139 |
</head>
|
140 |
<body>
|
|
|
151 |
<div class="cart-item">
|
152 |
<img src="{{ item.Image1__c }}" alt="{{ item.Name }}" onerror="this.src='/static/placeholder.jpg';">
|
153 |
<div class="cart-item-details">
|
154 |
+
<div class="cart-item-title">
|
155 |
+
{{ item.Name }}
|
156 |
+
<button class="remove-icon" onclick="removeItemFromCart('{{ item.Name }}')">🗑️</button>
|
157 |
+
</div>
|
158 |
<div class="cart-item-addons">
|
159 |
<small class="text-muted">Add-ons: {{ item.Add_Ons__c }}</small>
|
160 |
</div>
|
|
|
162 |
<small class="text-muted">Instructions: {{ item.Instructions__c or "None" }}</small>
|
163 |
</div>
|
164 |
<div class="cart-item-quantity mt-2">
|
165 |
+
<button onclick="updateQuantity('decrease', '{{ item.Name }}', '{{ customer_email }}')">-</button>
|
166 |
+
<input type="text" value="{{ item.Quantity__c|int }}" readonly data-item-name="{{ item.Name }}">
|
167 |
+
<button onclick="updateQuantity('increase', '{{ item.Name }}', '{{ customer_email }}')">+</button>
|
|
|
|
|
|
|
168 |
</div>
|
169 |
</div>
|
170 |
<div class="cart-item-actions">
|
171 |
<div class="text-primary">
|
172 |
$<span class="base-price">{{ item.Price__c }}</span>
|
173 |
</div>
|
|
|
174 |
</div>
|
175 |
</div>
|
176 |
{% else %}
|