card drawer show amount for free delivery

main
alexanderroese 2024-06-19 09:55:51 +02:00
parent ee64699f07
commit 04f465a6ec
2 changed files with 3 additions and 1 deletions

View File

@ -58,6 +58,8 @@ class CartItems extends HTMLElement {
} }
onCartUpdate() { onCartUpdate() {
console.log("onCartUpdate");
if (this.tagName === "CART-DRAWER-ITEMS") { if (this.tagName === "CART-DRAWER-ITEMS") {
fetch(`${routes.cart_url}?section_id=cart-drawer`) fetch(`${routes.cart_url}?section_id=cart-drawer`)
.then((response) => response.text()) .then((response) => response.text())

View File

@ -82,7 +82,7 @@
{% endif %} {% endif %}
<script> <script>
console.log("cart31", {{ cart | json }}, {{ remaining_amount }}, {{ free_shipping_threshold }}, {{ progress_percentage }}, {{ total_price }}, {{ free_shipping_threshold }}, {{ total_price | times: 100 | divided_by: free_shipping_threshold }}) console.log("cart32", {{ cart | json }}, {{ remaining_amount }}, {{ free_shipping_threshold }}, {{ progress_percentage }}, {{ total_price }}, {{ free_shipping_threshold }}, {{ total_price | times: 100 | divided_by: free_shipping_threshold }})
</script> </script>
<div style="padding: 12px 12px 0 12px; background-color: #deecde; text-align: center;"> <div style="padding: 12px 12px 0 12px; background-color: #deecde; text-align: center;">