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 CrChck\CreateCheckout\Cron;

class CreateCheckout
  protected $_product;

 public function __construct(

\Magento\Catalog\Model\Product $product

 ) {
     $this->_product= $product;

   public function getBundlePrice(){

       $product = $this->_product->load(8)
       echo $bundleObj->getMinimalPrice();// For min price
       echo $bundleObj->getMaximalPrice(); // for max price


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.