The code below returns 0, because in the Cron class it is impossible to inject
Model Product,
Who can help there are options to get prices ?
namespace CrChckCreateCheckoutCron;
class CreateCheckout
{
protected $_product;
public function __construct(
MagentoCatalogModelProduct $product
) {
$this->_product= $product;
}
public function getBundlePrice(){
$product = $this->_product->load(8)
$bundleObj=$product->getPriceInfo()->getPrice('final_price');
echo $bundleObj->getMinimalPrice();// For min price
echo $bundleObj->getMaximalPrice(); // for max price
}
}