card drawer show amount for free delivery

main
alexanderroese 2024-06-19 09:17:05 +02:00
parent 4aa36a3071
commit d2b1e26bb4
1 changed files with 2 additions and 4 deletions

View File

@ -76,15 +76,13 @@
{% assign total_price = cart.total_price %}
{% assign remaining_amount = free_shipping_threshold | minus: total_price %}
{% assign shipping_costs = settings.shx_shipping_costs %}
{% assign progress_percentage = total_price | divided_by: free_shipping_threshold | times: 100 %}
{% assign progress_percentage = total_price | divided_by: free_shipping_threshold %}
{% if progress_percentage > 100 %}
{% assign progress_percentage = 100 %}
{% endif %}
<script>
console.log("cart18", {{ cart | json }}, {{ remaining_amount }}, {{ free_shipping_threshold }}, {{ progress_percentage }})
console.log("cart19", {{ cart | json }}, {{ remaining_amount }}, {{ free_shipping_threshold }}, {{ progress_percentage }})
</script>
<div style="padding: 12px 12px 0 12px; background-color: #deecde; text-align: center;">