9
9
/** @var $block \Magento\Weee\Block\Item\Price\Renderer */
10
10
11
11
$ item = $ block ->getItem ();
12
+
13
+ // ensure we use the zone for the shopping cart / minicart
14
+ $ originalZone = $ block ->getZone ();
15
+ $ block ->setZone (\Magento \Framework \Pricing \Render::ZONE_CART );
12
16
?>
17
+
13
18
<?php if ($ block ->displayPriceInclTax () || $ block ->displayBothPrices ()): ?>
14
- <span class="price-including-tax" data-label="<?php echo $ block ->escapeHtml (__ ('Incl. Tax ' )); ?> ">
15
- <?php if ($ block ->displayPriceWithWeeeDetails ()): ?>
16
- <span class="minicart-tax-total">
17
- <?php else : ?>
19
+ <span class="price-including-tax" data-label="<?php echo $ block ->escapeHtml (__ ('Incl. Tax ' )); ?> ">
20
+ <?php if ($ block ->displayPriceWithWeeeDetails ()): ?>
21
+ <span class="minicart-tax-total">
22
+ <?php else : ?>
18
23
<span class="minicart-price">
19
- <?php endif ; ?>
24
+ <?php endif ; ?>
20
25
<?php /* @escapeNotVerified */ echo $ block ->formatPrice ($ block ->getUnitDisplayPriceInclTax ()); ?>
21
- </span>
26
+ </span>
22
27
28
+ <?php if ($ block ->displayPriceWithWeeeDetails ()): ?>
23
29
<?php if ($ this ->helper ('Magento\Weee\Helper\Data ' )->getApplied ($ item )): ?>
24
- <span class="minicart-tax-info" style="display: none" >
25
- <?php foreach ($ this ->helper ('Magento\Weee\Helper\Data ' )->getApplied ($ item ) as $ tax ): ?>
26
- <span class="weee" data-label="<?php /* @escapeNotVerified */ echo $ tax ['title ' ]; ?> ">
27
- <?php /* @escapeNotVerified */ echo $ block ->formatPrice ($ tax ['amount_incl_tax ' ], true , true ); ?>
28
- </span>
29
- <?php endforeach ; ?>
30
+ <span class="minicart-tax-info">
31
+ <?php foreach ($ this ->helper ('Magento\Weee\Helper\Data ' )->getApplied ($ item ) as $ tax ): ?>
32
+ <span class="weee" data-label="<?php /* @escapeNotVerified */ echo $ tax ['title ' ]; ?> ">
33
+ <?php /* @escapeNotVerified */ echo $ block ->formatPrice ($ tax ['amount_incl_tax ' ], true , true ); ?>
34
+ </span>
35
+ <?php endforeach ; ?>
30
36
</span>
31
37
32
38
<?php if ($ block ->displayFinalPrice ()): ?>
@@ -37,35 +43,39 @@ $item = $block->getItem();
37
43
</span>
38
44
<?php endif ; ?>
39
45
<?php endif ; ?>
40
- </span>
41
46
<?php endif ; ?>
47
+ </span>
48
+ <?php endif ; ?>
42
49
43
- <?php if ($ block ->displayPriceExclTax () || $ block ->displayBothPrices ()): ?>
50
+ <?php if ($ block ->displayPriceExclTax () || $ block ->displayBothPrices ()): ?>
44
51
<span class="price-excluding-tax" data-label="<?php echo $ block ->escapeHtml (__ ('Excl. Tax ' )); ?> ">
45
- <?php if ($ block ->displayPriceWithWeeeDetails ()): ?>
52
+ <?php if ($ block ->displayPriceWithWeeeDetails ()): ?>
46
53
<span class="minicart-tax-total">
47
- <?php else : ?>
48
- <span class="minicart-price">
49
- <?php endif ; ?>
54
+ <?php else : ?>
55
+ <span class="minicart-price">
56
+ <?php endif ; ?>
50
57
<?php /* @escapeNotVerified */ echo $ block ->formatPrice ($ block ->getUnitDisplayPriceExclTax ()); ?>
51
- </span>
58
+ </span>
52
59
53
- <?php if ($ this ->helper ('Magento\Weee\Helper\Data ' )->getApplied ($ item )): ?>
54
- <span class="minicart-tax-info">
55
- <?php foreach ($ this ->helper ('Magento\Weee\Helper\Data ' )->getApplied ($ item ) as $ tax ): ?>
56
- <span class="weee" data-label="<?php /* @escapeNotVerified */ echo $ tax ['title ' ]; ?> ">
57
- <?php /* @escapeNotVerified */ echo $ block ->formatPrice ($ tax ['amount ' ], true , true ); ?>
58
- </span>
59
- <?php endforeach ; ?>
60
+ <?php if ($ block ->displayPriceWithWeeeDetails ()): ?>
61
+ <?php if ($ this ->helper ('Magento\Weee\Helper\Data ' )->getApplied ($ item )): ?>
62
+ <span class="minicart-tax-info">
63
+ <?php foreach ($ this ->helper ('Magento\Weee\Helper\Data ' )->getApplied ($ item ) as $ tax ): ?>
64
+ <span class="weee" data-label="<?php /* @escapeNotVerified */ echo $ tax ['title ' ]; ?> ">
65
+ <?php /* @escapeNotVerified */ echo $ block ->formatPrice ($ tax ['amount ' ], true , true ); ?>
66
+ </span>
67
+ <?php endforeach ; ?>
60
68
</span>
61
69
62
70
<?php if ($ block ->displayFinalPrice ()): ?>
63
- <span class="minicart-tax-total">
71
+ <span class="minicart-tax-total">
64
72
<span class="weee" data-label="<?php echo $ block ->escapeHtml (__ ('Total ' )); ?> ">
65
73
<?php /* @escapeNotVerified */ echo $ block ->formatPrice ($ block ->getFinalUnitDisplayPriceExclTax ()); ?>
66
74
</span>
67
75
</span>
68
- <?php endif ; ?>
69
76
<?php endif ; ?>
70
- </span>
71
77
<?php endif ; ?>
78
+ <?php endif ; ?>
79
+ </span>
80
+ <?php endif ; ?>
81
+ <?php $ block ->setZone ($ originalZone ); ?>
0 commit comments