summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-10-30 11:13:31 +0000
committerqsm-odoo <qsm@odoo.com>2018-10-30 13:59:41 +0000
commit385ed7bd86eea069ed90f374c0a8757ed18367ea (patch)
tree455ce540ca7d9c74c39749045b03a23793a4a481
parent297edf8d49eab1f168abb8ca5d1d5ab916ef067e (diff)
[FIX] website_sale: review shop cart summary
On the payment page, a cart summary appears on the right. This summary is still not visually perfect and the design will be improved in master. This commit however restores what can be considered as a bug with a minimal diff: - "I have a coupon" message was glued to the card border - If a product name was long, the table was very small on Firefox as the name broke accordingly while it was very large on Chrome. Also see https://github.com/odoo/odoo/pull/28245/files closes odoo/odoo#28286
-rw-r--r--addons/website_sale/static/src/scss/website_sale.scss13
-rw-r--r--addons/website_sale/views/templates.xml6
2 files changed, 9 insertions, 10 deletions
diff --git a/addons/website_sale/static/src/scss/website_sale.scss b/addons/website_sale/static/src/scss/website_sale.scss
index 0b63585fb8b..0e0afc31128 100644
--- a/addons/website_sale/static/src/scss/website_sale.scss
+++ b/addons/website_sale/static/src/scss/website_sale.scss
@@ -32,18 +32,17 @@
word-wrap: break-word;
}
- .td-qty {
- width: 130px;
- @include media-breakpoint-down(md) {
- width: 60px
- }
- }
-
@include media-breakpoint-down(sm) {
.td-img {
display: none;
}
}
+
+ .toggle_summary_div {
+ @include media-breakpoint-up(xl) {
+ max-width: 400px;
+ }
+ }
}
/* ---- Default Styles ---- */
diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml
index b363f1a0de1..7527eb91e8d 100644
--- a/addons/website_sale/views/templates.xml
+++ b/addons/website_sale/views/templates.xml
@@ -802,7 +802,7 @@
</t>
</td>
<td class="text-center td-qty">
- <div t-if="not line.linked_line_id" class="css_quantity input-group oe_website_spinner">
+ <div t-if="not line.linked_line_id" class="css_quantity input-group mx-auto oe_website_spinner">
<div class="input-group-prepend">
<a t-attf-href="#" class="btn btn-link js_add_cart_json d-none d-md-inline-block" aria-label="Remove one" title="Remove one">
<i class="fa fa-minus"></i>
@@ -1362,7 +1362,7 @@
Your cart is empty!
</div>
<div class="toggle_summary_div d-none d-xl-block">
- <table class="table table-striped table-sm w-xl-0" id="cart_products" t-if="website_sale_order and website_sale_order.website_order_line">
+ <table class="table table-striped table-sm" id="cart_products" t-if="website_sale_order and website_sale_order.website_order_line">
<thead>
<tr>
<th class="border-top-0 td-img">Product</th>
@@ -1512,7 +1512,7 @@
<template id="reduction_code" inherit_id="website_sale.total" active="True" customize_show="True" name="Promo Code">
<xpath expr="//div[@id='cart_total']//table/tr[last()]" position="after">
<tr t-if="not hide_coupon">
- <td colspan="3" class="text-center text-xl-right noborder p-0">
+ <td colspan="3" class="text-center text-xl-right noborder">
<span class=''>
<t t-set='force_coupon' t-value="website_sale_order.pricelist_id.code or request.params.get('code_not_available')"/>
<t t-if="not force_coupon">