I would like to display all customer group price for that product on product detail page.
May be need to work on vendor\magento\module-catalog\view\base\templates\product\price\final_price.phtml
So when user is not logged in they are able to see for this Group we have this prices.
$productId = $block->getSaleableItem()->getId();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$ProductObject = $objectManager->create('Magento\Catalog\Model\Product')->load($productId);
$groupPrices = $ProductObject->getData('group_price');
echo "<pre>";
print_r($groupPrices);
exit;
After that, need to set Customer Group wise Promotion Price, then also display that.
Best Answer
Below is the way to get
How to avoid
ObjectManager
in above code? If you know then can update the answer or post own.Thanks