I am trying to remove prices for certain products in a group from being displayed. I created an interceptor with the afterIsSalable method to check for my condition and return false if met.
This works fine mostly however within
grouped.phtml which shows all the grouped prices on the product view page the
$_item->isSalable() returns true (when it should return false for this case).
If I grab the product like below it correctly returns false however:
//test just to grab the product from the item id and check value: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $_producttest = $objectManager->get('Magento\Catalog\Model\Product')->load($_item->getId()); echo "DISP:" . $_producttest->isSalable(); //RETURNS FALSE
$_item->isSalable(); //RETURNS TRUE
Why would this be working like this?