Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $objectManager = MagentoFrameworkAppObjectManager::getInstance();
- $storeInformation = $objectManager->create('MagentoStoreModelInformation');
- $store = $objectManager->create('MagentoStoreModelStore');
- $storeInfo = $storeInformation->getStoreInformationObject($store);
- $product = $block->getCurrentProduct();
- ?>
- <?php if($_product->getData('show_price')): ?>
- <?php if($_product->getPriceInfo()->getPrice('final_price')->getValue() == 0): ?>
- <span class="price-call"><a href="tel:+1<?php echo $storeInfo->getPhone(); ?>">Call for Price!</a></span>
- <?php else: ?>
- <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; ?>
- <?php if($_product->getData('priced_starting_at')): ?>
- <div class="price-starting-at">Starting at:</div>
- <?php else: ?>
- <div class="price-regular">Our Price:</div>
- <?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>
- <?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>
- <?php endif; ?>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement