Skip to content

Commit 1469b66

Browse files
authored
Merge pull request #811 from tblivet/fix/old-qa-feedbacks
Fix old QA feedbacks
2 parents c4ae7ab + 2f517b8 commit 1469b66

File tree

4 files changed

+33
-19
lines changed

4 files changed

+33
-19
lines changed

src/js/components/useQuantityInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const updateQuantity = async (qtyInputGroup: Theme.QuantityInput.InputGroup, cha
150150
const errors = data.errors as string;
151151

152152
if (errors) {
153-
useToast(errors, {type: 'danger', autohide: false}).show();
153+
useToast(errors, {type: 'danger'}).show();
154154
}
155155
}
156156

src/js/components/useToast.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,12 @@ const setCloseButtonVisible = (toastElement: HTMLElement): void => {
222222
if (closeButton) {
223223
const colorClass = toastElement.classList.toString().match(/(?:text-bg-)\w+/)?.[0];
224224
const color = colorClass?.split('-').pop();
225-
const darkColors = ['dark', 'primary', 'secondary', 'success', 'danger'];
225+
const darkColors = ['dark', 'primary', 'secondary', 'success'];
226226

227227
if (color && darkColors.includes(color)) {
228228
closeButton.classList.add('btn-close-white');
229+
} else {
230+
closeButton.classList.add('btn-close-black');
229231
}
230232

231233
closeButton.classList.remove('d-none');

src/scss/prestashop/components/cart/_cart-summary-product.scss

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,32 @@ $component-name: cart-summary-product;
3030

3131
&__attributes {
3232
font-size: 0.875rem;
33-
color: var(--bs-secondary-color);
33+
color: var(--bs-tertiary-color);
3434
}
3535

3636
&__quantity {
3737
font-size: 0.875rem;
3838
}
3939

40-
&__prices {
41-
text-align: right;
40+
&__price {
41+
font-size: 0.875rem;
42+
43+
.value {
44+
color: var(--bs-tertiary-color);
45+
text-decoration: line-through;
46+
}
4247
}
4348

4449
&__unit-price {
4550
font-size: 0.875rem;
46-
color: var(--bs-gray-500);
51+
color: var(--bs-tertiary-color);
4752
}
4853

49-
&__regular-price {
50-
font-size: 0.875rem;
51-
color: var(--bs-tertiary-color);
52-
text-decoration: line-through;
54+
&__prices {
55+
text-align: right;
56+
}
57+
58+
&__total {
59+
font-weight: 600;
5360
}
5461
}

templates/checkout/_partials/cart-summary-product-line.tpl

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,19 @@
9191
</div>
9292
{/if}
9393

94+
{if $product.has_discount}
95+
<div class="{$componentName}__price">
96+
<span class="label">{$product.price}</span>
97+
<span class="value">{$product.regular_price}</span>
98+
</div>
99+
{/if}
100+
101+
{if $product.unit_price_full}
102+
<div class="{$componentName}__unit-price">
103+
<span class="value">{$product.unit_price_full}</span>
104+
</div>
105+
{/if}
106+
94107
<div class="{$componentName}__quantity">
95108
<span class="label">{l s='Quantity:' d='Shop.Theme.Checkout'}</span>
96109
<span class="value">x{$product.quantity}</span>
@@ -99,15 +112,7 @@
99112

100113
<div class="{$componentName}__content-right">
101114
<div class="{$componentName}__prices">
102-
<div class="{$componentName}__price">{$product.total}</div>
103-
104-
{if $product.unit_price_full}
105-
<div class="{$componentName}__unit-price">{$product.unit_price_full}</div>
106-
{/if}
107-
108-
{if $product.has_discount}
109-
<div class="{$componentName}__regular-price">{$product.regular_price}</div>
110-
{/if}
115+
<div class="{$componentName}__total">{$product.total}</div>
111116

112117
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
113118
</div>

0 commit comments

Comments
 (0)