Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- // @codingStandardsIgnoreFile
- ?>
- <?php /** @var \Magento\Framework\Pricing\Render\Amount $block */ ?>
- <?php
- $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
- $_product = $objectManager->get('Magento\Catalog\Model\Product')->load($block->getSaleableItem()->getId());
- $unit = $_product->getResource()->getAttribute('unit')->getFrontend()->getValue($_product);;
- ?>
- <span class="price-container <?= /* @escapeNotVerified */ $block->getAdjustmentCssClasses() ?>"
- <?= $block->getSchema() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : '' ?>>
- <?php if ($block->getDisplayLabel()): ?>
- <span class="price-label"><?= /* @escapeNotVerified */ $block->getDisplayLabel() ?></span>
- <?php endif; ?>
- <span <?php if ($block->getPriceId()): ?> id="<?= /* @escapeNotVerified */ $block->getPriceId() ?>"<?php endif;?>
- <?= ($block->getPriceDisplayLabel()) ? 'data-label="' . $block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes() . '"' : '' ?>
- data-price-amount="<?= /* @escapeNotVerified */ $block->getDisplayValue() ?>"
- data-price-type="<?= /* @escapeNotVerified */ $block->getPriceType() ?>"
- class="price-wrapper <?= /* @escapeNotVerified */ $block->getPriceWrapperCss() ?>">
- <?= /* @escapeNotVerified */ $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer())."<span class=\"price\">/".$unit."</span>" ?>
- </span>
- <?php if ($block->hasAdjustmentsHtml()): ?>
- <?= $block->getAdjustmentsHtml() ?>
- <?php endif; ?>
- <?php if ($block->getSchema()): ?>
- <meta itemprop="price" content="<?= /* @escapeNotVerified */ $block->getDisplayValue() ?>" />
- <meta itemprop="priceCurrency" content="<?= /* @escapeNotVerified */ $block->getDisplayCurrencyCode() ?>" />
- <?php endif; ?>
- </span>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement