magento,  MAGENTO2

Get product price and currency symbol in phtml page magento2 from product id

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); 

$priceHelper = $objectManager->create('Magento\Framework\Pricing\Helper\Data');
$b= 1234;
$productd = $objectManager->get('Magento\Catalog\Model\Product')->load($b); 
$regularPrice= $productd->getPrice();
$specialPrice = $productd->getFinalPrice();
<?php  echo $priceHelper->currency($specialPrice, true, false) ?> 
// code for  currency with special price

Leave a Reply

Your email address will not be published. Required fields are marked *

11 − 5 =