Skip to main content
Commonmark migration
Source Link

so far I've experienced some complications performing this override, I had to override also PlaceOrderDefaulr, PlaceOrderFactory and PlaceOrderInferface

I've added preferences tags in ../etc/di.xml of my module to include above mentioned classes, but now the error prompted is:

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Multishipping\Model\Checkout\Type\Multishipping::__construct() must be an instance of Magento\Checkout\Model\Session, array given, called in C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php on line 271 and defined in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php:209 Stack trace: #0 C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php(271): Magento\Multishipping\Model\Checkout\Type\Multishipping->__construct(Array) #1 C:\xampp\htdocs\Magento2.2.5\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111): Inchoo\Hello\Model\Checkout\Type\Multishipping

1 C:\xampp\htdocs\Magento2.2.5\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111):

Inchoo\Hello\Model\Checkout\Type\Multishipping->__construct(Object(Magento\Checkout\Model\Session), Object(Magento\Customer\Model\Session), Object(Magento\Sales\Model\OrderFactory), Object(Magento\Customer\Model\ResourceModel\AddressRepository), Object(Magento\Framework\Event\Manager\Proxy), Object(Magento\Framework\A in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php on line 209

so far I've experienced some complications performing this override, I had to override also PlaceOrderDefaulr, PlaceOrderFactory and PlaceOrderInferface

I've added preferences tags in ../etc/di.xml of my module to include above mentioned classes, but now the error prompted is:

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Multishipping\Model\Checkout\Type\Multishipping::__construct() must be an instance of Magento\Checkout\Model\Session, array given, called in C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php on line 271 and defined in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php:209 Stack trace: #0 C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php(271): Magento\Multishipping\Model\Checkout\Type\Multishipping->__construct(Array) #1 C:\xampp\htdocs\Magento2.2.5\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111): Inchoo\Hello\Model\Checkout\Type\Multishipping->__construct(Object(Magento\Checkout\Model\Session), Object(Magento\Customer\Model\Session), Object(Magento\Sales\Model\OrderFactory), Object(Magento\Customer\Model\ResourceModel\AddressRepository), Object(Magento\Framework\Event\Manager\Proxy), Object(Magento\Framework\A in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php on line 209

so far I've experienced some complications performing this override, I had to override also PlaceOrderDefaulr, PlaceOrderFactory and PlaceOrderInferface

I've added preferences tags in ../etc/di.xml of my module to include above mentioned classes, but now the error prompted is:

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Multishipping\Model\Checkout\Type\Multishipping::__construct() must be an instance of Magento\Checkout\Model\Session, array given, called in C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php on line 271 and defined in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php:209 Stack trace: #0 C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php(271): Magento\Multishipping\Model\Checkout\Type\Multishipping->__construct(Array)

1 C:\xampp\htdocs\Magento2.2.5\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111):

Inchoo\Hello\Model\Checkout\Type\Multishipping->__construct(Object(Magento\Checkout\Model\Session), Object(Magento\Customer\Model\Session), Object(Magento\Sales\Model\OrderFactory), Object(Magento\Customer\Model\ResourceModel\AddressRepository), Object(Magento\Framework\Event\Manager\Proxy), Object(Magento\Framework\A in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php on line 209

added 56 characters in body
Source Link
Jarnail S
  • 4.7k
  • 30
  • 46
  • 80

so far I've experienced some complications performing this override, I had to override also PlaceOrderDefaulr, PlaceOrderFactory and PlaceOrderInferface

I've added preferences tags in ../etc/di.xml of my module to include above mentioned classes, but now the error prompted is:

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Multishipping\Model\Checkout\Type\Multishipping::__construct() must be an instance of Magento\Checkout\Model\Session, array given, called in C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php on line 271 and defined in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php:209 Stack trace: #0 C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php(271): Magento\Multishipping\Model\Checkout\Type\Multishipping->__construct(Array) #1 C:\xampp\htdocs\Magento2.2.5\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111): Inchoo\Hello\Model\Checkout\Type\Multishipping->__construct(Object(Magento\Checkout\Model\Session), Object(Magento\Customer\Model\Session), Object(Magento\Sales\Model\OrderFactory), Object(Magento\Customer\Model\ResourceModel\AddressRepository), Object(Magento\Framework\Event\Manager\Proxy), Object(Magento\Framework\A in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php on line 209

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Multishipping\Model\Checkout\Type\Multishipping::__construct() must be an instance of Magento\Checkout\Model\Session, array given, called in C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php on line 271 and defined in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php:209 Stack trace: #0 C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php(271): Magento\Multishipping\Model\Checkout\Type\Multishipping->__construct(Array) #1 C:\xampp\htdocs\Magento2.2.5\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111): Inchoo\Hello\Model\Checkout\Type\Multishipping->__construct(Object(Magento\Checkout\Model\Session), Object(Magento\Customer\Model\Session), Object(Magento\Sales\Model\OrderFactory), Object(Magento\Customer\Model\ResourceModel\AddressRepository), Object(Magento\Framework\Event\Manager\Proxy), Object(Magento\Framework\A in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php on line 209

so far I've experienced some complications performing this override, I had to override also PlaceOrderDefaulr, PlaceOrderFactory and PlaceOrderInferface

I've added preferences tags in ../etc/di.xml of my module to include above mentioned classes, but now the error prompted is:

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Multishipping\Model\Checkout\Type\Multishipping::__construct() must be an instance of Magento\Checkout\Model\Session, array given, called in C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php on line 271 and defined in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php:209 Stack trace: #0 C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php(271): Magento\Multishipping\Model\Checkout\Type\Multishipping->__construct(Array) #1 C:\xampp\htdocs\Magento2.2.5\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111): Inchoo\Hello\Model\Checkout\Type\Multishipping->__construct(Object(Magento\Checkout\Model\Session), Object(Magento\Customer\Model\Session), Object(Magento\Sales\Model\OrderFactory), Object(Magento\Customer\Model\ResourceModel\AddressRepository), Object(Magento\Framework\Event\Manager\Proxy), Object(Magento\Framework\A in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php on line 209

so far I've experienced some complications performing this override, I had to override also PlaceOrderDefaulr, PlaceOrderFactory and PlaceOrderInferface

I've added preferences tags in ../etc/di.xml of my module to include above mentioned classes, but now the error prompted is:

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Multishipping\Model\Checkout\Type\Multishipping::__construct() must be an instance of Magento\Checkout\Model\Session, array given, called in C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php on line 271 and defined in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php:209 Stack trace: #0 C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php(271): Magento\Multishipping\Model\Checkout\Type\Multishipping->__construct(Array) #1 C:\xampp\htdocs\Magento2.2.5\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111): Inchoo\Hello\Model\Checkout\Type\Multishipping->__construct(Object(Magento\Checkout\Model\Session), Object(Magento\Customer\Model\Session), Object(Magento\Sales\Model\OrderFactory), Object(Magento\Customer\Model\ResourceModel\AddressRepository), Object(Magento\Framework\Event\Manager\Proxy), Object(Magento\Framework\A in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php on line 209

Source Link
user72313
user72313

I am trying to override multishipping.php file in vendor/magento/module-multishipping/Model/Checkout/Type/Multishipping.php

so far I've experienced some complications performing this override, I had to override also PlaceOrderDefaulr, PlaceOrderFactory and PlaceOrderInferface

I've added preferences tags in ../etc/di.xml of my module to include above mentioned classes, but now the error prompted is:

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Multishipping\Model\Checkout\Type\Multishipping::__construct() must be an instance of Magento\Checkout\Model\Session, array given, called in C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php on line 271 and defined in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php:209 Stack trace: #0 C:\xampp\htdocs\Magento2.2.5\app\code\Inchoo\Hello\Model\Checkout\Type\Multishipping.php(271): Magento\Multishipping\Model\Checkout\Type\Multishipping->__construct(Array) #1 C:\xampp\htdocs\Magento2.2.5\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111): Inchoo\Hello\Model\Checkout\Type\Multishipping->__construct(Object(Magento\Checkout\Model\Session), Object(Magento\Customer\Model\Session), Object(Magento\Sales\Model\OrderFactory), Object(Magento\Customer\Model\ResourceModel\AddressRepository), Object(Magento\Framework\Event\Manager\Proxy), Object(Magento\Framework\A in C:\xampp\htdocs\Magento2.2.5\vendor\magento\module-multishipping\Model\Checkout\Type\Multishipping.php on line 209