card drawer show amount for free delivery

main
alexanderroese 2024-06-18 23:15:23 +02:00
parent f95e6ee4ce
commit bd123e3862
2 changed files with 38 additions and 5 deletions

View File

@ -415,3 +415,28 @@ cart-drawer-items::-webkit-scrollbar-track-piece {
margin-left: 0;
}
}
.shx-shipping-costs-progress {
margin: 50px auto;
padding: 2px;
width: 100%;
max-width: 500px;
border: 3px solid #05e35e;
height: 30px;
}
.shx-shipping-costs-progress-bar {
height: 100%;
width: 0%;
background-color: #05e35e;
animation: fill-bar 3s;
}
@keyframes fill-bar {
from {
width: 0%;
}
to {
width: 100%;
}
}

View File

@ -82,11 +82,19 @@
console.log("cart14", {{ cart | json }}, {{ remaining_amount }}, {{ free_shipping_threshold }})
</script>
{% if total_price < free_shipping_threshold %}
<div style="padding: 12px; background-color: #deecde; text-align: center;">
<span style="font-size: 14px; color: #4B7046">Noch {{ remaining_amount | money }} bis kostenfreiem Versand (sonst {{ shipping_costs | money }})</span>
</div>
{% endif %}
<div style="padding: 12px; background-color: #deecde; text-align: center;">
<span style="font-size: 14px; color: #4B7046">
{% if total_price < free_shipping_threshold %}
Noch {{ remaining_amount | money }} bis kostenfreiem Versand (sonst {{ shipping_costs | money }})
{% elsif %}
Prima! Du erhälst kostenfreien Versand
{% endif %}
</span>
</div>
<div class="shx-shipping-costs-progress">
<div class="shx-shipping-costs-progress-bar"></div>
</div>
<cart-drawer-items
{% if cart == empty %}