Skip to content

Commit 1473a2f

Browse files
committed
feat: add gift info in final summary
1 parent 9b966b8 commit 1473a2f

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

src/scss/prestashop/components/_order-confirmation.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,17 @@ $component-name: order-confirmation;
117117
color: var(--bs-tertiary-color);
118118
}
119119

120+
&-gift {
121+
display: inline-flex;
122+
gap: 0.25rem;
123+
align-items: center;
124+
font-weight: 600;
125+
126+
&-icon {
127+
font-size: 1.25rem;
128+
}
129+
}
130+
120131
&-total {
121132
font-size: 1rem;
122133
font-weight: 600;

templates/checkout/_partials/order-confirmation-table-multishipment.tpl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,15 @@
132132
</div>
133133

134134
<div class="{$componentName}__product-prices">
135-
<div class="{$componentName}__product-total">
136-
{$product.total}
137-
</div>
135+
{if !empty($product.is_gift)}
136+
<div class="{$componentName}__product-gift">
137+
<i class="{$componentName}__product-gift-icon material-icons" aria-hidden="true">&#xE8B1;</i>{$product.quantity} {l s='Gift(s)' d='Shop.Theme.Checkout'}
138+
</div>
139+
{else}
140+
<div class="{$componentName}__product-total">
141+
{$product.total}
142+
</div>
143+
{/if}
138144
</div>
139145
</div>
140146
</div>

templates/checkout/_partials/order-confirmation-table.tpl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,15 @@
119119
</div>
120120

121121
<div class="{$componentName}__product-prices">
122-
<div class="{$componentName}__product-total">
123-
{$product.total}
124-
</div>
122+
{if !empty($product.is_gift)}
123+
<div class="{$componentName}__product-gift">
124+
<i class="{$componentName}__product-gift-icon material-icons" aria-hidden="true">&#xE8B1;</i>{$product.quantity} {l s='Gift(s)' d='Shop.Theme.Checkout'}
125+
</div>
126+
{else}
127+
<div class="{$componentName}__product-total">
128+
{$product.total}
129+
</div>
130+
{/if}
125131
</div>
126132
</div>
127133
</div>

0 commit comments

Comments
 (0)