Hi,
I am trying to show As low as price without vat into the product listing page but the problem is that it's always shown with vat. Here i am attaching the front end picture where i am showing and the calling function from where it's coming.
Can any one suggest how can call minimal price without vat into FinalPriceBox.php file?
Thanking you.
Hello @InspireDev,
There's no perfect way to do it, best solution I have found is to override the template where the price rendering is happening and use the base amount instead of full amount for "As low as".
My/Theme/Magento_Catalog/templates/product/price/amount/default.phtml
<?php /** * Copyright © 2013-2017 Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ // @codingStandardsIgnoreFile ?> <?php /** @var \Magento\Framework\Pricing\Render\Amount $block */ ?> <?php if ($block->getDisplayLabel() != 'As low as') { $price = $block->getDisplayValue(); } else { $price = $block->getAmount()->getBaseAmount(); } ?> <span class="price-container <?php /* @escapeNotVerified */ echo $block->getAdjustmentCssClasses() ?>" <?php echo $block->getSchema() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : '' ?>> <?php if ($block->getDisplayLabel()): ?> <span class="price-label"><?php /* @escapeNotVerified */ echo $block->getDisplayLabel(); ?></span> <?php endif; ?> <span <?php if ($block->getPriceId()): ?> id="<?php /* @escapeNotVerified */ echo $block->getPriceId() ?>"<?php endif;?> <?php echo($block->getPriceDisplayLabel()) ? 'data-label="' . $block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes() . '"' : '' ?> data-price-amount="<?php /* @escapeNotVerified */ echo $price; ?>" data-price-type="<?php /* @escapeNotVerified */ echo $block->getPriceType(); ?>" class="price-wrapper <?php /* @escapeNotVerified */ echo $block->getPriceWrapperCss(); ?>" <?php echo $block->getSchema() ? ' itemprop="price"' : '' ?>> <?php /* @escapeNotVerified */ echo $block->formatCurrency($price, (bool)$block->getIncludeContainer()) ?> </span> <?php if ($block->hasAdjustmentsHtml()): ?> <?php echo $block->getAdjustmentsHtml() ?> <?php endif; ?> <?php if ($block->getSchema()): ?> <meta itemprop="priceCurrency" content="<?php /* @escapeNotVerified */ echo $block->getDisplayCurrencyCode()?>" /> <?php endif; ?> </span>
--
If my answer is useful, please Accept as Solution & give Kudos