Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/js/components/useQuantityInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const updateQuantity = async (qtyInputGroup: Theme.QuantityInput.InputGroup, cha
const errors = data.errors as string;

if (errors) {
useToast(errors, {type: 'danger', autohide: false}).show();
useToast(errors, {type: 'danger'}).show();
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/js/components/useToast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,12 @@ const setCloseButtonVisible = (toastElement: HTMLElement): void => {
if (closeButton) {
const colorClass = toastElement.classList.toString().match(/(?:text-bg-)\w+/)?.[0];
const color = colorClass?.split('-').pop();
const darkColors = ['dark', 'primary', 'secondary', 'success', 'danger'];
const darkColors = ['dark', 'primary', 'secondary', 'success'];

if (color && darkColors.includes(color)) {
closeButton.classList.add('btn-close-white');
} else {
closeButton.classList.add('btn-close-black');
}

closeButton.classList.remove('d-none');
Expand Down
23 changes: 15 additions & 8 deletions src/scss/prestashop/components/cart/_cart-summary-product.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,32 @@ $component-name: cart-summary-product;

&__attributes {
font-size: 0.875rem;
color: var(--bs-secondary-color);
color: var(--bs-tertiary-color);
}

&__quantity {
font-size: 0.875rem;
}

&__prices {
text-align: right;
&__price {
font-size: 0.875rem;

.value {
color: var(--bs-tertiary-color);
text-decoration: line-through;
}
}

&__unit-price {
font-size: 0.875rem;
color: var(--bs-gray-500);
color: var(--bs-tertiary-color);
}

&__regular-price {
font-size: 0.875rem;
color: var(--bs-tertiary-color);
text-decoration: line-through;
&__prices {
text-align: right;
}

&__total {
font-weight: 600;
}
}
23 changes: 14 additions & 9 deletions templates/checkout/_partials/cart-summary-product-line.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@
</div>
{/if}

{if $product.has_discount}
<div class="{$componentName}__price">
<span class="label">{$product.price}</span>
<span class="value">{$product.regular_price}</span>
</div>
{/if}

{if $product.unit_price_full}
<div class="{$componentName}__unit-price">
<span class="value">{$product.unit_price_full}</span>
</div>
{/if}

<div class="{$componentName}__quantity">
<span class="label">{l s='Quantity:' d='Shop.Theme.Checkout'}</span>
<span class="value">x{$product.quantity}</span>
Expand All @@ -99,15 +112,7 @@

<div class="{$componentName}__content-right">
<div class="{$componentName}__prices">
<div class="{$componentName}__price">{$product.total}</div>

{if $product.unit_price_full}
<div class="{$componentName}__unit-price">{$product.unit_price_full}</div>
{/if}

{if $product.has_discount}
<div class="{$componentName}__regular-price">{$product.regular_price}</div>
{/if}
<div class="{$componentName}__total">{$product.total}</div>

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