Magento 2 EE getting error when we try to save order from the backend












3















I have tried many solutions to fix this core issue. Whenever I am going to edit the order, update shipping or payment method and click on save. I am getting below error



Fatal error: Uncaught Error: Call to a member function getIsMultiShipping() on null in /var/www/html/ottocap/vendor/magento/module-customer-balance/Observer/PaymentDataImportObserver.php:52 Stack trace: #0 /var/www/html/ottocap/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): MagentoCustomerBalanceObserverPaymentDataImportObserver->execute(Object(MagentoFrameworkEventObserver)) #1 /var/www/html/ottocap/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoCustomerBalanceObserverPaymentDataImportObserver), Object(MagentoFrameworkEventObserver)) #2 /var/www/html/ottocap/vendor/magento/module-staging/Model/Event/Manager.php(97): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver)) #3 /var/www/html/ottocap/var/generation/Magento/Staging/Model/Event/Manager/Proxy.php(95): MagentoStagingModelEventManager->dispatch('sales_quote_pay...', Array) #4 /var/www/ht in /var/www/html/ottocap/vendor/magento/module-customer-balance/Observer/PaymentDataImportObserver.php on line 52


I have debugged and came to know that Quote not generated properly. Due to that, I am getting this error. Please let us know if anyone has its solution to fix this issue.










share|improve this question























  • If you are running EE there is pro support for you

    – Anthony
    Nov 27 '18 at 8:50











  • Yes, already created a ticket in the support, they are looking into it since 8days.

    – Nits
    Nov 27 '18 at 8:51











  • Could need alot of looking into. One option is to put it up on freelancer as a one time fix job. Should not cost much

    – Anthony
    Nov 27 '18 at 8:57











  • Thanks I don't have that option.

    – Nits
    Nov 27 '18 at 8:59











  • @Nits Have you found any solution?

    – Octopus
    19 hours ago
















3















I have tried many solutions to fix this core issue. Whenever I am going to edit the order, update shipping or payment method and click on save. I am getting below error



Fatal error: Uncaught Error: Call to a member function getIsMultiShipping() on null in /var/www/html/ottocap/vendor/magento/module-customer-balance/Observer/PaymentDataImportObserver.php:52 Stack trace: #0 /var/www/html/ottocap/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): MagentoCustomerBalanceObserverPaymentDataImportObserver->execute(Object(MagentoFrameworkEventObserver)) #1 /var/www/html/ottocap/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoCustomerBalanceObserverPaymentDataImportObserver), Object(MagentoFrameworkEventObserver)) #2 /var/www/html/ottocap/vendor/magento/module-staging/Model/Event/Manager.php(97): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver)) #3 /var/www/html/ottocap/var/generation/Magento/Staging/Model/Event/Manager/Proxy.php(95): MagentoStagingModelEventManager->dispatch('sales_quote_pay...', Array) #4 /var/www/ht in /var/www/html/ottocap/vendor/magento/module-customer-balance/Observer/PaymentDataImportObserver.php on line 52


I have debugged and came to know that Quote not generated properly. Due to that, I am getting this error. Please let us know if anyone has its solution to fix this issue.










share|improve this question























  • If you are running EE there is pro support for you

    – Anthony
    Nov 27 '18 at 8:50











  • Yes, already created a ticket in the support, they are looking into it since 8days.

    – Nits
    Nov 27 '18 at 8:51











  • Could need alot of looking into. One option is to put it up on freelancer as a one time fix job. Should not cost much

    – Anthony
    Nov 27 '18 at 8:57











  • Thanks I don't have that option.

    – Nits
    Nov 27 '18 at 8:59











  • @Nits Have you found any solution?

    – Octopus
    19 hours ago














3












3








3








I have tried many solutions to fix this core issue. Whenever I am going to edit the order, update shipping or payment method and click on save. I am getting below error



Fatal error: Uncaught Error: Call to a member function getIsMultiShipping() on null in /var/www/html/ottocap/vendor/magento/module-customer-balance/Observer/PaymentDataImportObserver.php:52 Stack trace: #0 /var/www/html/ottocap/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): MagentoCustomerBalanceObserverPaymentDataImportObserver->execute(Object(MagentoFrameworkEventObserver)) #1 /var/www/html/ottocap/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoCustomerBalanceObserverPaymentDataImportObserver), Object(MagentoFrameworkEventObserver)) #2 /var/www/html/ottocap/vendor/magento/module-staging/Model/Event/Manager.php(97): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver)) #3 /var/www/html/ottocap/var/generation/Magento/Staging/Model/Event/Manager/Proxy.php(95): MagentoStagingModelEventManager->dispatch('sales_quote_pay...', Array) #4 /var/www/ht in /var/www/html/ottocap/vendor/magento/module-customer-balance/Observer/PaymentDataImportObserver.php on line 52


I have debugged and came to know that Quote not generated properly. Due to that, I am getting this error. Please let us know if anyone has its solution to fix this issue.










share|improve this question














I have tried many solutions to fix this core issue. Whenever I am going to edit the order, update shipping or payment method and click on save. I am getting below error



Fatal error: Uncaught Error: Call to a member function getIsMultiShipping() on null in /var/www/html/ottocap/vendor/magento/module-customer-balance/Observer/PaymentDataImportObserver.php:52 Stack trace: #0 /var/www/html/ottocap/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): MagentoCustomerBalanceObserverPaymentDataImportObserver->execute(Object(MagentoFrameworkEventObserver)) #1 /var/www/html/ottocap/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): MagentoFrameworkEventInvokerInvokerDefault->_callObserverMethod(Object(MagentoCustomerBalanceObserverPaymentDataImportObserver), Object(MagentoFrameworkEventObserver)) #2 /var/www/html/ottocap/vendor/magento/module-staging/Model/Event/Manager.php(97): MagentoFrameworkEventInvokerInvokerDefault->dispatch(Array, Object(MagentoFrameworkEventObserver)) #3 /var/www/html/ottocap/var/generation/Magento/Staging/Model/Event/Manager/Proxy.php(95): MagentoStagingModelEventManager->dispatch('sales_quote_pay...', Array) #4 /var/www/ht in /var/www/html/ottocap/vendor/magento/module-customer-balance/Observer/PaymentDataImportObserver.php on line 52


I have debugged and came to know that Quote not generated properly. Due to that, I am getting this error. Please let us know if anyone has its solution to fix this issue.







magento-2.1.8 magento-ee






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 27 '18 at 7:31









NitsNits

1,264316




1,264316













  • If you are running EE there is pro support for you

    – Anthony
    Nov 27 '18 at 8:50











  • Yes, already created a ticket in the support, they are looking into it since 8days.

    – Nits
    Nov 27 '18 at 8:51











  • Could need alot of looking into. One option is to put it up on freelancer as a one time fix job. Should not cost much

    – Anthony
    Nov 27 '18 at 8:57











  • Thanks I don't have that option.

    – Nits
    Nov 27 '18 at 8:59











  • @Nits Have you found any solution?

    – Octopus
    19 hours ago



















  • If you are running EE there is pro support for you

    – Anthony
    Nov 27 '18 at 8:50











  • Yes, already created a ticket in the support, they are looking into it since 8days.

    – Nits
    Nov 27 '18 at 8:51











  • Could need alot of looking into. One option is to put it up on freelancer as a one time fix job. Should not cost much

    – Anthony
    Nov 27 '18 at 8:57











  • Thanks I don't have that option.

    – Nits
    Nov 27 '18 at 8:59











  • @Nits Have you found any solution?

    – Octopus
    19 hours ago

















If you are running EE there is pro support for you

– Anthony
Nov 27 '18 at 8:50





If you are running EE there is pro support for you

– Anthony
Nov 27 '18 at 8:50













Yes, already created a ticket in the support, they are looking into it since 8days.

– Nits
Nov 27 '18 at 8:51





Yes, already created a ticket in the support, they are looking into it since 8days.

– Nits
Nov 27 '18 at 8:51













Could need alot of looking into. One option is to put it up on freelancer as a one time fix job. Should not cost much

– Anthony
Nov 27 '18 at 8:57





Could need alot of looking into. One option is to put it up on freelancer as a one time fix job. Should not cost much

– Anthony
Nov 27 '18 at 8:57













Thanks I don't have that option.

– Nits
Nov 27 '18 at 8:59





Thanks I don't have that option.

– Nits
Nov 27 '18 at 8:59













@Nits Have you found any solution?

– Octopus
19 hours ago





@Nits Have you found any solution?

– Octopus
19 hours ago










1 Answer
1






active

oldest

votes


















0














We got the solution for the above issue. In this issue, store not set up properly when we edit and save the order from the backend. So what I did, I have set an admin store when we edit and save the order. Please review the below code:




/var/www/html/m218ee/app/code/Extension/Override/etc/adminhtml/di.xml




<type name="MagentoFrameworkAppFrontControllerInterface">
<plugin name="md_default_store_setter" type="ExtensionOverridePluginDefaultStore" />
</type>



/var/www/html/ottocap/app/code/Extension/Override/Plugin/DefaultStore.php




namespace OttoOverridePlugin;

/**
* Plugin to set default store for admin area.
*/
class DefaultStore
{
/**
* @var MagentoStoreModelStoreManagerInterface
*/
protected $storeManager;

/**
* Initialize dependencies.
*
* @param MagentoStoreModelStoreManagerInterface $storeManager
*/
public function __construct(
MagentoStoreModelStoreManagerInterface $storeManager
) {
$this->storeManager = $storeManager;
}

/**
* Set current store for admin area
*
* @param MagentoFrameworkAppFrontController $subject
* @param MagentoFrameworkAppRequestInterface $request
* @return void
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function beforeDispatch(
MagentoFrameworkAppFrontControllerInterface $subject , MagentoFrameworkAppRequestInterface $request
) {

$path = $request->getParams();
if(!empty($path) && isset($path['namespace']) && $path['namespace']=='product_listing'){
//Fixed default store issue in the product grid backend(previously showing default store value instead of admin store).
$this->storeManager->setCurrentStore(MagentoStoreModelStore::ADMIN_CODE);
}

}
}


Please run below commands




php bin/magento cache:flush or rm -rf var/*




If production mode is enable then you should run compilation command




php bin/magento setup:di:compile




and if require run static-content command




php bin/magento setup:static-content:deploy




I hope the above code help you.





share























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "479"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f251414%2fmagento-2-ee-getting-error-when-we-try-to-save-order-from-the-backend%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    We got the solution for the above issue. In this issue, store not set up properly when we edit and save the order from the backend. So what I did, I have set an admin store when we edit and save the order. Please review the below code:




    /var/www/html/m218ee/app/code/Extension/Override/etc/adminhtml/di.xml




    <type name="MagentoFrameworkAppFrontControllerInterface">
    <plugin name="md_default_store_setter" type="ExtensionOverridePluginDefaultStore" />
    </type>



    /var/www/html/ottocap/app/code/Extension/Override/Plugin/DefaultStore.php




    namespace OttoOverridePlugin;

    /**
    * Plugin to set default store for admin area.
    */
    class DefaultStore
    {
    /**
    * @var MagentoStoreModelStoreManagerInterface
    */
    protected $storeManager;

    /**
    * Initialize dependencies.
    *
    * @param MagentoStoreModelStoreManagerInterface $storeManager
    */
    public function __construct(
    MagentoStoreModelStoreManagerInterface $storeManager
    ) {
    $this->storeManager = $storeManager;
    }

    /**
    * Set current store for admin area
    *
    * @param MagentoFrameworkAppFrontController $subject
    * @param MagentoFrameworkAppRequestInterface $request
    * @return void
    *
    * @SuppressWarnings(PHPMD.UnusedFormalParameter)
    */
    public function beforeDispatch(
    MagentoFrameworkAppFrontControllerInterface $subject , MagentoFrameworkAppRequestInterface $request
    ) {

    $path = $request->getParams();
    if(!empty($path) && isset($path['namespace']) && $path['namespace']=='product_listing'){
    //Fixed default store issue in the product grid backend(previously showing default store value instead of admin store).
    $this->storeManager->setCurrentStore(MagentoStoreModelStore::ADMIN_CODE);
    }

    }
    }


    Please run below commands




    php bin/magento cache:flush or rm -rf var/*




    If production mode is enable then you should run compilation command




    php bin/magento setup:di:compile




    and if require run static-content command




    php bin/magento setup:static-content:deploy




    I hope the above code help you.





    share




























      0














      We got the solution for the above issue. In this issue, store not set up properly when we edit and save the order from the backend. So what I did, I have set an admin store when we edit and save the order. Please review the below code:




      /var/www/html/m218ee/app/code/Extension/Override/etc/adminhtml/di.xml




      <type name="MagentoFrameworkAppFrontControllerInterface">
      <plugin name="md_default_store_setter" type="ExtensionOverridePluginDefaultStore" />
      </type>



      /var/www/html/ottocap/app/code/Extension/Override/Plugin/DefaultStore.php




      namespace OttoOverridePlugin;

      /**
      * Plugin to set default store for admin area.
      */
      class DefaultStore
      {
      /**
      * @var MagentoStoreModelStoreManagerInterface
      */
      protected $storeManager;

      /**
      * Initialize dependencies.
      *
      * @param MagentoStoreModelStoreManagerInterface $storeManager
      */
      public function __construct(
      MagentoStoreModelStoreManagerInterface $storeManager
      ) {
      $this->storeManager = $storeManager;
      }

      /**
      * Set current store for admin area
      *
      * @param MagentoFrameworkAppFrontController $subject
      * @param MagentoFrameworkAppRequestInterface $request
      * @return void
      *
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
      public function beforeDispatch(
      MagentoFrameworkAppFrontControllerInterface $subject , MagentoFrameworkAppRequestInterface $request
      ) {

      $path = $request->getParams();
      if(!empty($path) && isset($path['namespace']) && $path['namespace']=='product_listing'){
      //Fixed default store issue in the product grid backend(previously showing default store value instead of admin store).
      $this->storeManager->setCurrentStore(MagentoStoreModelStore::ADMIN_CODE);
      }

      }
      }


      Please run below commands




      php bin/magento cache:flush or rm -rf var/*




      If production mode is enable then you should run compilation command




      php bin/magento setup:di:compile




      and if require run static-content command




      php bin/magento setup:static-content:deploy




      I hope the above code help you.





      share


























        0












        0








        0







        We got the solution for the above issue. In this issue, store not set up properly when we edit and save the order from the backend. So what I did, I have set an admin store when we edit and save the order. Please review the below code:




        /var/www/html/m218ee/app/code/Extension/Override/etc/adminhtml/di.xml




        <type name="MagentoFrameworkAppFrontControllerInterface">
        <plugin name="md_default_store_setter" type="ExtensionOverridePluginDefaultStore" />
        </type>



        /var/www/html/ottocap/app/code/Extension/Override/Plugin/DefaultStore.php




        namespace OttoOverridePlugin;

        /**
        * Plugin to set default store for admin area.
        */
        class DefaultStore
        {
        /**
        * @var MagentoStoreModelStoreManagerInterface
        */
        protected $storeManager;

        /**
        * Initialize dependencies.
        *
        * @param MagentoStoreModelStoreManagerInterface $storeManager
        */
        public function __construct(
        MagentoStoreModelStoreManagerInterface $storeManager
        ) {
        $this->storeManager = $storeManager;
        }

        /**
        * Set current store for admin area
        *
        * @param MagentoFrameworkAppFrontController $subject
        * @param MagentoFrameworkAppRequestInterface $request
        * @return void
        *
        * @SuppressWarnings(PHPMD.UnusedFormalParameter)
        */
        public function beforeDispatch(
        MagentoFrameworkAppFrontControllerInterface $subject , MagentoFrameworkAppRequestInterface $request
        ) {

        $path = $request->getParams();
        if(!empty($path) && isset($path['namespace']) && $path['namespace']=='product_listing'){
        //Fixed default store issue in the product grid backend(previously showing default store value instead of admin store).
        $this->storeManager->setCurrentStore(MagentoStoreModelStore::ADMIN_CODE);
        }

        }
        }


        Please run below commands




        php bin/magento cache:flush or rm -rf var/*




        If production mode is enable then you should run compilation command




        php bin/magento setup:di:compile




        and if require run static-content command




        php bin/magento setup:static-content:deploy




        I hope the above code help you.





        share













        We got the solution for the above issue. In this issue, store not set up properly when we edit and save the order from the backend. So what I did, I have set an admin store when we edit and save the order. Please review the below code:




        /var/www/html/m218ee/app/code/Extension/Override/etc/adminhtml/di.xml




        <type name="MagentoFrameworkAppFrontControllerInterface">
        <plugin name="md_default_store_setter" type="ExtensionOverridePluginDefaultStore" />
        </type>



        /var/www/html/ottocap/app/code/Extension/Override/Plugin/DefaultStore.php




        namespace OttoOverridePlugin;

        /**
        * Plugin to set default store for admin area.
        */
        class DefaultStore
        {
        /**
        * @var MagentoStoreModelStoreManagerInterface
        */
        protected $storeManager;

        /**
        * Initialize dependencies.
        *
        * @param MagentoStoreModelStoreManagerInterface $storeManager
        */
        public function __construct(
        MagentoStoreModelStoreManagerInterface $storeManager
        ) {
        $this->storeManager = $storeManager;
        }

        /**
        * Set current store for admin area
        *
        * @param MagentoFrameworkAppFrontController $subject
        * @param MagentoFrameworkAppRequestInterface $request
        * @return void
        *
        * @SuppressWarnings(PHPMD.UnusedFormalParameter)
        */
        public function beforeDispatch(
        MagentoFrameworkAppFrontControllerInterface $subject , MagentoFrameworkAppRequestInterface $request
        ) {

        $path = $request->getParams();
        if(!empty($path) && isset($path['namespace']) && $path['namespace']=='product_listing'){
        //Fixed default store issue in the product grid backend(previously showing default store value instead of admin store).
        $this->storeManager->setCurrentStore(MagentoStoreModelStore::ADMIN_CODE);
        }

        }
        }


        Please run below commands




        php bin/magento cache:flush or rm -rf var/*




        If production mode is enable then you should run compilation command




        php bin/magento setup:di:compile




        and if require run static-content command




        php bin/magento setup:static-content:deploy




        I hope the above code help you.






        share











        share


        share










        answered 6 mins ago









        NitsNits

        1,264316




        1,264316






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f251414%2fmagento-2-ee-getting-error-when-we-try-to-save-order-from-the-backend%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            What other Star Trek series did the main TNG cast show up in?

            Berlina muro

            Berlina aerponto