@@ -32,27 +32,29 @@ $msrpPrice = $block->renderAmount(
32
32
$ priceElementIdPrefix = $ block ->getPriceElementIdPrefix () ? $ block ->getPriceElementIdPrefix () : 'product-price- ' ;
33
33
?>
34
34
35
- <?php if ($ amount ): ?>
35
+ <?php if ($ amount ) : ?>
36
36
<span class="old-price map-old-price"><?= /* @noEscape */ $ msrpPrice ?> </span>
37
37
<span class="map-fallback-price normal-price"><?= /* @noEscape */ $ msrpPrice ?> </span>
38
38
<?php endif ; ?>
39
39
40
- <?php if ($ priceType ->isShowPriceOnGesture ()): ?>
40
+ <?php if ($ priceType ->isShowPriceOnGesture ()) : ?>
41
41
<?php
42
42
43
43
$ addToCartUrl = '' ;
44
44
if ($ product ->isSaleable ()) {
45
45
/** @var Magento\Catalog\Block\Product\AbstractProduct $addToCartUrlGenerator */
46
- $ addToCartUrlGenerator = $ block ->getLayout ()->getBlockSingleton ('Magento\Catalog\Block\Product\AbstractProduct ' );
46
+ $ addToCartUrlGenerator = $ block ->getLayout ()->getBlockSingleton (\Magento \Catalog \Block \Product \AbstractProduct::class);
47
+ // phpcs:disable
47
48
$ addToCartUrl = $ addToCartUrlGenerator ->getAddToCartUrl (
48
49
$ product ,
49
50
['_query ' => [
50
51
\Magento \Framework \App \ActionInterface::PARAM_NAME_URL_ENCODED =>
51
- $ this ->helper (' Magento\Framework\Url\Helper\Data ' )->getEncodedUrl (
52
+ $ this ->helper (\ Magento \Framework \Url \Helper \Data::class )->getEncodedUrl (
52
53
$ addToCartUrlGenerator ->getAddToCartUrl ($ product )
53
54
),
54
55
]]
55
56
);
57
+ // phpcs:enable
56
58
}
57
59
58
60
$ priceElementId = $ priceElementIdPrefix . $ productId . $ block ->getIdSuffix ();
@@ -77,24 +79,29 @@ $priceElementIdPrefix = $block->getPriceElementIdPrefix() ? $block->getPriceElem
77
79
$ data ['addToCart ' ]['addToCartButton ' ] = sprintf (
78
80
'form:has(input[type="hidden"][name="product"][value="%s"]) button[type="submit"] ' ,
79
81
(int ) $ productId . ', ' .
80
- sprintf ('.block.widget .price-box[data-product-id=%s]+.product-item-actions button.tocart ' ,
81
- (int ) $ productId ));
82
+ sprintf (
83
+ '.block.widget .price-box[data-product-id=%s]+.product-item-actions button.tocart ' ,
84
+ (int )$ productId
85
+ )
86
+ );
82
87
}
83
88
?>
84
89
<span id="<?= $ block ->escapeHtmlAttr ($ block ->getPriceId () ? $ block ->getPriceId () : $ priceElementId ) ?> " style="display:none"></span>
85
90
<a href="javascript:void(0);"
86
91
id="<?= /* @noEscape */ ($ popupId ) ?> "
87
92
class="action map-show-info"
88
- data-mage-init='<?= /* @noEscape */ $ this ->helper ('Magento\Framework\Json\Helper\Data ' )->jsonEncode ($ data ) ?> '>
93
+ <?php //phpcs:disable ?>
94
+ data-mage-init='<?= /* @noEscape */ $ this ->helper (\Magento \Framework \Json \Helper \Data::class)->jsonEncode ($ data ) ?> '>
95
+ <?php //phpcs:enable ?>
89
96
<?= $ block ->escapeHtml (__ ('Click for price ' )) ?>
90
97
</a>
91
- <?php else : ?>
98
+ <?php else : ?>
92
99
<span class="msrp-message">
93
100
<?= $ block ->escapeHtml ($ priceType ->getMsrpPriceMessage ()) ?>
94
101
</span>
95
102
<?php endif ; ?>
96
103
97
- <?php if ($ block ->getZone () == \Magento \Framework \Pricing \Render::ZONE_ITEM_VIEW ): ?>
104
+ <?php if ($ block ->getZone () == \Magento \Framework \Pricing \Render::ZONE_ITEM_VIEW ) : ?>
98
105
<?php $ helpLinkId = 'msrp-help- ' . $ productId . $ block ->getRandomString (20 ); ?>
99
106
<a href="javascript:void(0);"
100
107
id="<?= /* @noEscape */ $ helpLinkId ?> "
0 commit comments