Skip to content

Commit e9eed5b

Browse files
authored
Merge pull request #924 from tblivet/fix/display-product-price-block-hook
Move displayProductPriceBlock hook position
2 parents f41df36 + 6d4bc9e commit e9eed5b

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ $component-name: product-line;
6262
font-size: 0.875rem;
6363
}
6464

65+
&-price-block {
66+
width: 100%;
67+
}
68+
6569
&--info {
6670
display: flex;
6771
flex-wrap: wrap;

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
<div class="product-line__item product-line__item--prices">
9797
<span class="product-line__item-price">{$product.price}</span>
9898
{if $product.unit_price_full}
99-
<div class="product-line__item-unit-price">{$product.unit_price_full}</div>
99+
<span class="product-line__item-unit-price">{$product.unit_price_full}</span>
100100
{/if}
101101

102102
{if $product.has_discount}
@@ -112,6 +112,13 @@
112112
</span>
113113
{/if}
114114
{/if}
115+
116+
{capture name='product_price_block'}{hook h='displayProductPriceBlock' product=$product type="unit_price"}{/capture}
117+
{if $smarty.capture.product_price_block}
118+
<div class="product-line__item-price-block">
119+
{$smarty.capture.product_price_block nofilter}
120+
</div>
121+
{/if}
115122
</div>
116123
</div>
117124

@@ -146,8 +153,6 @@
146153
<div class="product-line__price">{$product.total}</div>
147154
{/if}
148155
{/if}
149-
150-
{hook h='displayProductPriceBlock' product=$product type="unit_price"}
151156
</div>
152157

153158
<div class="product-line__actions">

0 commit comments

Comments
 (0)