3 replaced http://magento.stackexchange.com/ with https://magento.stackexchange.com/
source | link

I am trying to extend Magento\Sales\Block\Order\View by using preferences to get some more information into customer order view page. Everything works fine if i remove __construct. so what might be the root cause of this issue?

Have been following lot of answers from community but no luck. ( removed cache,generation and done upgrade ) linklink

Errors :

From report : Object DOMDocument should be created.

From log :

Recoverable Error: Argument 2 passed to Magento\Sales\Block\Order\View::__construct() must be an instance of Magento\Framework\Registry,

namespace Myvendor\Mymodule\Block\Order;

use Magento\Customer\Model\Context;
/**
 * Sales order view block
 */
class View extends \Magento\Sales\Block\Order\View
{

    // Some protected properties 

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\App\Http\Context $httpContext,
        \Magento\Payment\Helper\Data $paymentHelper,
        array $data = []
    ) {
        $this->_paymentHelper = $paymentHelper;
        $this->_coreRegistry = $registry;
        $this->httpContext = $httpContext;
        parent::__construct($context,$paymentHelper,$registry,$httpContext, $data);
        $this->_isScopePrivate = true;
    }

Any help would be appreciated.

I am trying to extend Magento\Sales\Block\Order\View by using preferences to get some more information into customer order view page. Everything works fine if i remove __construct. so what might be the root cause of this issue?

Have been following lot of answers from community but no luck. ( removed cache,generation and done upgrade ) link

Errors :

From report : Object DOMDocument should be created.

From log :

Recoverable Error: Argument 2 passed to Magento\Sales\Block\Order\View::__construct() must be an instance of Magento\Framework\Registry,

namespace Myvendor\Mymodule\Block\Order;

use Magento\Customer\Model\Context;
/**
 * Sales order view block
 */
class View extends \Magento\Sales\Block\Order\View
{

    // Some protected properties 

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\App\Http\Context $httpContext,
        \Magento\Payment\Helper\Data $paymentHelper,
        array $data = []
    ) {
        $this->_paymentHelper = $paymentHelper;
        $this->_coreRegistry = $registry;
        $this->httpContext = $httpContext;
        parent::__construct($context,$paymentHelper,$registry,$httpContext, $data);
        $this->_isScopePrivate = true;
    }

Any help would be appreciated.

I am trying to extend Magento\Sales\Block\Order\View by using preferences to get some more information into customer order view page. Everything works fine if i remove __construct. so what might be the root cause of this issue?

Have been following lot of answers from community but no luck. ( removed cache,generation and done upgrade ) link

Errors :

From report : Object DOMDocument should be created.

From log :

Recoverable Error: Argument 2 passed to Magento\Sales\Block\Order\View::__construct() must be an instance of Magento\Framework\Registry,

namespace Myvendor\Mymodule\Block\Order;

use Magento\Customer\Model\Context;
/**
 * Sales order view block
 */
class View extends \Magento\Sales\Block\Order\View
{

    // Some protected properties 

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\App\Http\Context $httpContext,
        \Magento\Payment\Helper\Data $paymentHelper,
        array $data = []
    ) {
        $this->_paymentHelper = $paymentHelper;
        $this->_coreRegistry = $registry;
        $this->httpContext = $httpContext;
        parent::__construct($context,$paymentHelper,$registry,$httpContext, $data);
        $this->_isScopePrivate = true;
    }

Any help would be appreciated.

2 added 12 characters in body; edited tags
source | link

I am trying to extend Magento\Sales\Block\Order\ViewMagento\Sales\Block\Order\View by using preferences to get some more information into customer order view page. Everything works fine if i remove __construct. so what might be the root cause of this issue?

Have been following lot of answers from community but no luck. ( removed cache,generation and done upgrade ) link

Errors :

From report : Object DOMDocument should be created.

From log : Recoverable Error: Argument 2 passed to Magento\Sales\Block\Order\View::__construct() must be an instance of Magento\Framework\Registry, 

Recoverable Error: Argument 2 passed to Magento\Sales\Block\Order\View::__construct() must be an instance of Magento\Framework\Registry,

namespace Myvendor\Mymodule\Block\Order;

use Magento\Customer\Model\Context;
/**
 * Sales order view block
 */
class View extends \Magento\Sales\Block\Order\View
{

    // Some protected properties 

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\App\Http\Context $httpContext,
        \Magento\Payment\Helper\Data $paymentHelper,
        array $data = []
    ) {
        $this->_paymentHelper = $paymentHelper;
        $this->_coreRegistry = $registry;
        $this->httpContext = $httpContext;
        parent::__construct($context,$paymentHelper,$registry,$httpContext, $data);
        $this->_isScopePrivate = true;
    }

Any help would be appreciated.

I am trying to extend Magento\Sales\Block\Order\View by using preferences to get some more information into customer order view page. Everything works fine if i remove __construct. so what might be the root cause of this issue?

Have been following lot of answers from community but no luck. ( removed cache,generation and done upgrade ) link

Errors :

From report : Object DOMDocument should be created.

From log : Recoverable Error: Argument 2 passed to Magento\Sales\Block\Order\View::__construct() must be an instance of Magento\Framework\Registry,

namespace Myvendor\Mymodule\Block\Order;

use Magento\Customer\Model\Context;
/**
 * Sales order view block
 */
class View extends \Magento\Sales\Block\Order\View
{

    // Some protected properties 

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\App\Http\Context $httpContext,
        \Magento\Payment\Helper\Data $paymentHelper,
        array $data = []
    ) {
        $this->_paymentHelper = $paymentHelper;
        $this->_coreRegistry = $registry;
        $this->httpContext = $httpContext;
        parent::__construct($context,$paymentHelper,$registry,$httpContext, $data);
        $this->_isScopePrivate = true;
    }

Any help would be appreciated.

I am trying to extend Magento\Sales\Block\Order\View by using preferences to get some more information into customer order view page. Everything works fine if i remove __construct. so what might be the root cause of this issue?

Have been following lot of answers from community but no luck. ( removed cache,generation and done upgrade ) link

Errors :

From report : Object DOMDocument should be created.

From log : 

Recoverable Error: Argument 2 passed to Magento\Sales\Block\Order\View::__construct() must be an instance of Magento\Framework\Registry,

namespace Myvendor\Mymodule\Block\Order;

use Magento\Customer\Model\Context;
/**
 * Sales order view block
 */
class View extends \Magento\Sales\Block\Order\View
{

    // Some protected properties 

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\App\Http\Context $httpContext,
        \Magento\Payment\Helper\Data $paymentHelper,
        array $data = []
    ) {
        $this->_paymentHelper = $paymentHelper;
        $this->_coreRegistry = $registry;
        $this->httpContext = $httpContext;
        parent::__construct($context,$paymentHelper,$registry,$httpContext, $data);
        $this->_isScopePrivate = true;
    }

Any help would be appreciated.

1
source | link

Overriding Sales\Block\Order\View Block in Magento 2

I am trying to extend Magento\Sales\Block\Order\View by using preferences to get some more information into customer order view page. Everything works fine if i remove __construct. so what might be the root cause of this issue?

Have been following lot of answers from community but no luck. ( removed cache,generation and done upgrade ) link

Errors :

From report : Object DOMDocument should be created.

From log : Recoverable Error: Argument 2 passed to Magento\Sales\Block\Order\View::__construct() must be an instance of Magento\Framework\Registry,

namespace Myvendor\Mymodule\Block\Order;

use Magento\Customer\Model\Context;
/**
 * Sales order view block
 */
class View extends \Magento\Sales\Block\Order\View
{

    // Some protected properties 

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\App\Http\Context $httpContext,
        \Magento\Payment\Helper\Data $paymentHelper,
        array $data = []
    ) {
        $this->_paymentHelper = $paymentHelper;
        $this->_coreRegistry = $registry;
        $this->httpContext = $httpContext;
        parent::__construct($context,$paymentHelper,$registry,$httpContext, $data);
        $this->_isScopePrivate = true;
    }

Any help would be appreciated.