diff --git a/webshop/public/scss/webshop_cart.scss b/webshop/public/scss/webshop_cart.scss index 9a49e1ba67..7be37458ea 100644 --- a/webshop/public/scss/webshop_cart.scss +++ b/webshop/public/scss/webshop_cart.scss @@ -652,6 +652,13 @@ body.product-page { } .cart-table { + .cart-header { + display: none; + @media (min-width: 992px) { + display: table-header-group; + } + } + table-layout: fixed; tr { margin-bottom: 1rem; } @@ -675,10 +682,13 @@ body.product-page { .cart-item-image { width: 20%; - min-width: 100px; + min-width: 75px; img { max-height: 112px; } + @media (min-width: 992px) { + min-width: 100px; + } } .cart-items { @@ -712,6 +722,9 @@ body.product-page { .item-rate { font-size: 13px; color: var(--text-muted); + @media screen and (max-width: 992px) { + font-size: 10px; + } } .free-tag { @@ -722,8 +735,13 @@ body.product-page { textarea { width: 70%; + min-width: 105px; height: 30px; font-size: 14px; + @media screen and (max-width: 992px) { + width: 75%; + height: 35px; + } } } @@ -745,7 +763,7 @@ body.product-page { .item-column { width: 50%; @media (max-width: 992px) { - width: 70%; + width: 75%; } } @@ -1401,7 +1419,6 @@ body.product-page { transform: translate3d(0, 0, 0); pointer-events: auto; } - .w-fit { width: fit-content !important; } \ No newline at end of file diff --git a/webshop/templates/includes/cart/cart_items.html b/webshop/templates/includes/cart/cart_items.html index b820c706c1..997bff91c0 100644 --- a/webshop/templates/includes/cart/cart_items.html +++ b/webshop/templates/includes/cart/cart_items.html @@ -1,4 +1,5 @@ {% from "webshop/templates/includes/macros.html" import product_image %} +{% from "webshop/templates/includes/cart/cart_macros.html" import quantity_input %} {% macro item_subtotal(item) %}
@@ -12,7 +13,7 @@
{% else %} - + {{ _('Rate:') }} {{ item.get_formatted('rate') }} {% endif %} @@ -20,7 +21,7 @@ {% for d in doc.items %} - +
{% if d.thumbnail %} @@ -49,61 +50,24 @@ {% endif %} -
- -
+
+ {{ quantity_input(d) }} +
+
+ +
- -
- {% set disabled = 'disabled' if d.is_free_item else '' %} -
- - - - - - - - - -
- -
- {% if not d.is_free_item %} -
- - - -
- {% endif %} -
-
- - - - {% if cart_settings.enable_checkout or cart_settings.show_price_in_quotation %} -
- {{ item_subtotal(d) }} -
- {% endif %} + + {{ quantity_input(d) }} {% if cart_settings.enable_checkout or cart_settings.show_price_in_quotation %} - + {{ item_subtotal(d) }} {% endif %} diff --git a/webshop/templates/includes/cart/cart_items_total.html b/webshop/templates/includes/cart/cart_items_total.html index c94fde462b..a9afbeda1e 100644 --- a/webshop/templates/includes/cart/cart_items_total.html +++ b/webshop/templates/includes/cart/cart_items_total.html @@ -1,10 +1,6 @@ - - - {{ _("Total") }} - - - {{ doc.get_formatted("total") }} - + + {{ _("Total") }} {{ doc.get_formatted("total") }} + \ No newline at end of file diff --git a/webshop/templates/includes/cart/cart_macros.html b/webshop/templates/includes/cart/cart_macros.html index fd95dba424..1ff670b129 100644 --- a/webshop/templates/includes/cart/cart_macros.html +++ b/webshop/templates/includes/cart/cart_macros.html @@ -20,3 +20,39 @@ {% endmacro %} + +{% macro quantity_input(item) %} +
+ {% set disabled = 'disabled' if item.is_free_item else '' %} +
+ + + + + + + + + +
+ +
+ {% if not item.is_free_item %} +
+ + + +
+ {% endif %} +
+
+{% endmacro %} diff --git a/webshop/templates/pages/cart.html b/webshop/templates/pages/cart.html index ee4e3ea5dd..2ecae91a1b 100644 --- a/webshop/templates/pages/cart.html +++ b/webshop/templates/pages/cart.html @@ -16,7 +16,7 @@
-
+
{{ _('Items') }} @@ -25,11 +25,11 @@ {{ _('Item') }} - {{ _('Quantity') }} + {{ _('Quantity') }} {% if cart_settings.enable_checkout or cart_settings.show_price_in_quotation %} - {{ _('Subtotal') }} + {{ _('Subtotal') }} {% endif %} - + @@ -44,7 +44,7 @@
-
+
{% if cart_settings.enable_checkout %} {{ _('Past Orders') }} @@ -55,11 +55,12 @@ {% endif %}
-
+
{% if doc.items %} {% endif %} @@ -95,7 +96,7 @@
{{ _("Terms and Conditions") }}
-
+
{% endif %} {% endif %}