Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions src/scss/prestashop/components/cart/_cart-product-line.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ $component-name: product-line;
}

&__gift {
display: inline-flex;
gap: 0.25rem;
align-items: center;
font-weight: 600;

&-icon {
font-size: 1.25rem;
}
}

&__actions {
Expand Down
12 changes: 12 additions & 0 deletions src/scss/prestashop/components/cart/_cart-summary-product.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ $component-name: cart-summary-product;
text-align: right;
}

&__gift {
display: inline-flex;
gap: 0.25rem;
align-items: center;
font-size: 0.875rem;
font-weight: 600;

&-icon {
font-size: 1rem;
}
}

&__total {
font-weight: 600;
}
Expand Down
18 changes: 5 additions & 13 deletions templates/checkout/_partials/cart-detailed-product-line.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@
<div class="product-line__content-right">
<div class="product-line__quantity-button quantity-button js-quantity-button">
{if !empty($product.is_gift)}
<span class="product-line__gift-quantity">{$product.quantity} {l s='Gift(s)' d='Shop.Theme.Checkout'}</span>
<span class="product-line__gift">
<i class="product-line__gift-icon material-icons" aria-hidden="true">&#xE8B1;</i>{$product.quantity} {l s='Gift(s)' d='Shop.Theme.Checkout'}
</span>
{else}
{include file='components/qty-input.tpl'
attributes=[
Expand All @@ -133,18 +135,8 @@
{/if}
</div>

{if $product.has_discount}
{if !empty($product.is_gift)}
<div class="product-line__gift">{l s='Gift' d='Shop.Theme.Checkout'}</div>
{else}
<div class="product-line__price">{$product.total}</div>
{/if}
{else}
{if !empty($product.is_gift)}
<div class="product-line__gift">{l s='Gift' d='Shop.Theme.Checkout'}</div>
{else}
<div class="product-line__price">{$product.total}</div>
{/if}
{if empty($product.is_gift)}
<div class="product-line__price">{$product.total}</div>
{/if}

{hook h='displayProductPriceBlock' product=$product type="unit_price"}
Expand Down
6 changes: 6 additions & 0 deletions templates/checkout/_partials/cart-summary-product-line.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@
<span class="label">{l s='Quantity:' d='Shop.Theme.Checkout'}</span>
<span class="value">x{$product.quantity}</span>
</div>

<div class="{$componentName}__gift">
{if !empty($product.is_gift)}
<i class="{$componentName}__gift-icon material-icons" aria-hidden="true">&#xE8B1;</i> {l s='Gift(s)' d='Shop.Theme.Checkout'}
{/if}
</div>
</div>

<div class="{$componentName}__content-right">
Expand Down