Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
price_msrp_item.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 
11 <?php
17 ?>
18 <?php
20  $pricingHelper = $this->helper('Magento\Framework\Pricing\Helper\Data');
22  $_catalogHelper = $this->helper('Magento\Catalog\Helper\Data');
23 
25  $_product = $block->getProduct();
26  $_id = $_product->getId();
28 ?>
29 <div class="price-box msrp">
30  <?php if ($_product->getMsrp()): ?>
31  <?php $_msrpPrice = $pricingHelper->currency($_product->getMsrp(), true, false) ?>
32  <span class="old-price"><?= /* @escapeNotVerified */ $_msrpPrice ?></span>
33  <?php endif; ?>
34  <?php if ($_catalogHelper->isShowPriceOnGesture($_product)): ?>
35  <?php $priceElementId = 'product-price-' . $_id . $block->getIdSuffix(); ?>
36  <span id="<?= /* @escapeNotVerified */ $priceElementId ?>" style="display: none"></span>
37  <?php $popupId = 'msrp-popup-' . $_id . $block->getRandomString(20); ?>
38  <a href="javascript:void(0);"
39  id="<?= /* @escapeNotVerified */ ($popupId) ?>"
40  data-mage-init='{"addToCart":{"popupId": "#<?= /* @escapeNotVerified */ ($popupId) ?>",
41  "productName": "<?= /* @noEscape */ $block->escapeJs($block->escapeHtml($_product->getName())) ?>",
42  "realPrice": <?= /* @escapeNotVerified */ $block->getRealPriceJs($_product) ?>,
43  "msrpPrice": "<?= /* @escapeNotVerified */ $_msrpPrice ?>",
44  "priceElementId":"<?= /* @escapeNotVerified */ $priceElementId ?>",
45  "popupCartButtonId": "#map-popup-button",
46  "cartForm": "#wishlist-view-form"}}'><?= /* @escapeNotVerified */ __('Click for price') ?>
47  </a>
48  <?php else: ?>
49  <span class="msrp-message">
50  <?= /* @escapeNotVerified */ $_catalogHelper->getMsrpPriceMessage($_product) ?>
51  </span>
52  <?php endif; ?>
53  <?php $helpLinkId = 'msrp-help-' . $_id . $block->getRandomString(20); ?>
54  <a href="javascript:void(0);" id="<?= /* @escapeNotVerified */ ($helpLinkId) ?>" data-mage-init='{"addToCart":{"helpLinkId": "#<?= /* @escapeNotVerified */ ($helpLinkId) ?>", "productName": "<?= /* @noEscape */ $block->escapeJs($block->escapeHtml($_product->getName())) ?>"}}' class="link tip"><?= /* @escapeNotVerified */ __("What's this?") ?></a>
55 </div>
if( $_product->getMsrp())( $_product->getMsrp(), true, false) ?>< span class endif
$pricingHelper
if( $form)() ?>< script > require(['jquery' mage mage
Definition: save.phtml:15
__()
Definition: __.php:13
$block
Definition: block.php:8
$_catalogHelper