error after clear basket












0















I added a sample product to the basket. When I try to delete product from basket or clear basket an error is displayed.



Fatal error: Uncaught TypeError: Argument 1 passed to MagentoFrameworkExceptionInputException::__construct() must be an instance of MagentoFrameworkPhrase, string given, called in /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php on line 121 and defined in /home/brandswearxv/ftp/vendor/magento/framework/Exception/InputException.php:51 Stack trace: #0 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php(121): MagentoFrameworkExceptionInputException->__construct('Minimalne zamxC3xB3...') #1 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingProcessor.php(66): MagentoQuoteModelShippingAddressManagement->assign('66', Object(MagentoQuoteModelQuoteAddress)) #2 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingAssignmentProcessor.php(110): MagentoQuoteModelQuoteShippingAssignmentShippingProcessor->save(Object(MagentoQuoteModelShipping), Object(MagentoQuote in /home/brandswearxv/ftp/vendor/magento/framework/Exception/InputException.php on line 51


enter image description here










share|improve this question














bumped to the homepage by Community 15 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    I added a sample product to the basket. When I try to delete product from basket or clear basket an error is displayed.



    Fatal error: Uncaught TypeError: Argument 1 passed to MagentoFrameworkExceptionInputException::__construct() must be an instance of MagentoFrameworkPhrase, string given, called in /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php on line 121 and defined in /home/brandswearxv/ftp/vendor/magento/framework/Exception/InputException.php:51 Stack trace: #0 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php(121): MagentoFrameworkExceptionInputException->__construct('Minimalne zamxC3xB3...') #1 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingProcessor.php(66): MagentoQuoteModelShippingAddressManagement->assign('66', Object(MagentoQuoteModelQuoteAddress)) #2 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingAssignmentProcessor.php(110): MagentoQuoteModelQuoteShippingAssignmentShippingProcessor->save(Object(MagentoQuoteModelShipping), Object(MagentoQuote in /home/brandswearxv/ftp/vendor/magento/framework/Exception/InputException.php on line 51


    enter image description here










    share|improve this question














    bumped to the homepage by Community 15 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      I added a sample product to the basket. When I try to delete product from basket or clear basket an error is displayed.



      Fatal error: Uncaught TypeError: Argument 1 passed to MagentoFrameworkExceptionInputException::__construct() must be an instance of MagentoFrameworkPhrase, string given, called in /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php on line 121 and defined in /home/brandswearxv/ftp/vendor/magento/framework/Exception/InputException.php:51 Stack trace: #0 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php(121): MagentoFrameworkExceptionInputException->__construct('Minimalne zamxC3xB3...') #1 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingProcessor.php(66): MagentoQuoteModelShippingAddressManagement->assign('66', Object(MagentoQuoteModelQuoteAddress)) #2 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingAssignmentProcessor.php(110): MagentoQuoteModelQuoteShippingAssignmentShippingProcessor->save(Object(MagentoQuoteModelShipping), Object(MagentoQuote in /home/brandswearxv/ftp/vendor/magento/framework/Exception/InputException.php on line 51


      enter image description here










      share|improve this question














      I added a sample product to the basket. When I try to delete product from basket or clear basket an error is displayed.



      Fatal error: Uncaught TypeError: Argument 1 passed to MagentoFrameworkExceptionInputException::__construct() must be an instance of MagentoFrameworkPhrase, string given, called in /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php on line 121 and defined in /home/brandswearxv/ftp/vendor/magento/framework/Exception/InputException.php:51 Stack trace: #0 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php(121): MagentoFrameworkExceptionInputException->__construct('Minimalne zamxC3xB3...') #1 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingProcessor.php(66): MagentoQuoteModelShippingAddressManagement->assign('66', Object(MagentoQuoteModelQuoteAddress)) #2 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingAssignmentProcessor.php(110): MagentoQuoteModelQuoteShippingAssignmentShippingProcessor->save(Object(MagentoQuoteModelShipping), Object(MagentoQuote in /home/brandswearxv/ftp/vendor/magento/framework/Exception/InputException.php on line 51


      enter image description here







      magento-2.1






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 27 '17 at 16:01









      SylvesterSylvester

      675216




      675216





      bumped to the homepage by Community 15 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 15 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          2 Answers
          2






          active

          oldest

          votes


















          0














          I open file ShippingAddressManagement.php and here is code.



              $address->setSameAsBilling($sameAsBilling);
          $address->setSaveInAddressBook($saveInAddressBook);
          $address->setCollectShippingRates(true);

          if (!$quote->validateMinimumAmount($quote->getIsMultiShipping())) {
          throw new InputException($this->getMinimumAmountErrorMessage()->getMessage());
          }

          try {
          $address->save();
          } catch (Exception $e) {
          $this->logger->critical($e);
          throw new InputException(__('Unable to save address. Please check input data.'));
          }
          return $quote->getShippingAddress()->getId();
          }


          in line 121 is:



          throw new InputException($this->getMinimumAmountErrorMessage()->getMessage());



          it looks like it's all right but I dont know why get error.






          share|improve this answer































            0














            It seems it's magento internal issue so please open this file




            /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php




            and check on on line 121, check the code where exception is throwing.
            There must be directly string passed in exception so just make it like:




            __("that exception here")




            So simply means call this __(" ") there is two underscore in this function and paste that string in this function. This should be place in same place where directly sting is passed.



            For eg:
            If this was like




            throw new Exception("can not delete item");




            So it should be like




            throw new Exception(__("can not delete item"));




            Save and check if it's working. If this works then please create new module and use preference to override this file.
            It's not recommend to work directly on magento core file.



            This function is used for translation which return MagentoFrameworkPhrase object.






            share|improve this answer

























              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%2f207314%2ferror-after-clear-basket%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              I open file ShippingAddressManagement.php and here is code.



                  $address->setSameAsBilling($sameAsBilling);
              $address->setSaveInAddressBook($saveInAddressBook);
              $address->setCollectShippingRates(true);

              if (!$quote->validateMinimumAmount($quote->getIsMultiShipping())) {
              throw new InputException($this->getMinimumAmountErrorMessage()->getMessage());
              }

              try {
              $address->save();
              } catch (Exception $e) {
              $this->logger->critical($e);
              throw new InputException(__('Unable to save address. Please check input data.'));
              }
              return $quote->getShippingAddress()->getId();
              }


              in line 121 is:



              throw new InputException($this->getMinimumAmountErrorMessage()->getMessage());



              it looks like it's all right but I dont know why get error.






              share|improve this answer




























                0














                I open file ShippingAddressManagement.php and here is code.



                    $address->setSameAsBilling($sameAsBilling);
                $address->setSaveInAddressBook($saveInAddressBook);
                $address->setCollectShippingRates(true);

                if (!$quote->validateMinimumAmount($quote->getIsMultiShipping())) {
                throw new InputException($this->getMinimumAmountErrorMessage()->getMessage());
                }

                try {
                $address->save();
                } catch (Exception $e) {
                $this->logger->critical($e);
                throw new InputException(__('Unable to save address. Please check input data.'));
                }
                return $quote->getShippingAddress()->getId();
                }


                in line 121 is:



                throw new InputException($this->getMinimumAmountErrorMessage()->getMessage());



                it looks like it's all right but I dont know why get error.






                share|improve this answer


























                  0












                  0








                  0







                  I open file ShippingAddressManagement.php and here is code.



                      $address->setSameAsBilling($sameAsBilling);
                  $address->setSaveInAddressBook($saveInAddressBook);
                  $address->setCollectShippingRates(true);

                  if (!$quote->validateMinimumAmount($quote->getIsMultiShipping())) {
                  throw new InputException($this->getMinimumAmountErrorMessage()->getMessage());
                  }

                  try {
                  $address->save();
                  } catch (Exception $e) {
                  $this->logger->critical($e);
                  throw new InputException(__('Unable to save address. Please check input data.'));
                  }
                  return $quote->getShippingAddress()->getId();
                  }


                  in line 121 is:



                  throw new InputException($this->getMinimumAmountErrorMessage()->getMessage());



                  it looks like it's all right but I dont know why get error.






                  share|improve this answer













                  I open file ShippingAddressManagement.php and here is code.



                      $address->setSameAsBilling($sameAsBilling);
                  $address->setSaveInAddressBook($saveInAddressBook);
                  $address->setCollectShippingRates(true);

                  if (!$quote->validateMinimumAmount($quote->getIsMultiShipping())) {
                  throw new InputException($this->getMinimumAmountErrorMessage()->getMessage());
                  }

                  try {
                  $address->save();
                  } catch (Exception $e) {
                  $this->logger->critical($e);
                  throw new InputException(__('Unable to save address. Please check input data.'));
                  }
                  return $quote->getShippingAddress()->getId();
                  }


                  in line 121 is:



                  throw new InputException($this->getMinimumAmountErrorMessage()->getMessage());



                  it looks like it's all right but I dont know why get error.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 27 '17 at 19:21









                  SylvesterSylvester

                  675216




                  675216

























                      0














                      It seems it's magento internal issue so please open this file




                      /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php




                      and check on on line 121, check the code where exception is throwing.
                      There must be directly string passed in exception so just make it like:




                      __("that exception here")




                      So simply means call this __(" ") there is two underscore in this function and paste that string in this function. This should be place in same place where directly sting is passed.



                      For eg:
                      If this was like




                      throw new Exception("can not delete item");




                      So it should be like




                      throw new Exception(__("can not delete item"));




                      Save and check if it's working. If this works then please create new module and use preference to override this file.
                      It's not recommend to work directly on magento core file.



                      This function is used for translation which return MagentoFrameworkPhrase object.






                      share|improve this answer






























                        0














                        It seems it's magento internal issue so please open this file




                        /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php




                        and check on on line 121, check the code where exception is throwing.
                        There must be directly string passed in exception so just make it like:




                        __("that exception here")




                        So simply means call this __(" ") there is two underscore in this function and paste that string in this function. This should be place in same place where directly sting is passed.



                        For eg:
                        If this was like




                        throw new Exception("can not delete item");




                        So it should be like




                        throw new Exception(__("can not delete item"));




                        Save and check if it's working. If this works then please create new module and use preference to override this file.
                        It's not recommend to work directly on magento core file.



                        This function is used for translation which return MagentoFrameworkPhrase object.






                        share|improve this answer




























                          0












                          0








                          0







                          It seems it's magento internal issue so please open this file




                          /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php




                          and check on on line 121, check the code where exception is throwing.
                          There must be directly string passed in exception so just make it like:




                          __("that exception here")




                          So simply means call this __(" ") there is two underscore in this function and paste that string in this function. This should be place in same place where directly sting is passed.



                          For eg:
                          If this was like




                          throw new Exception("can not delete item");




                          So it should be like




                          throw new Exception(__("can not delete item"));




                          Save and check if it's working. If this works then please create new module and use preference to override this file.
                          It's not recommend to work directly on magento core file.



                          This function is used for translation which return MagentoFrameworkPhrase object.






                          share|improve this answer















                          It seems it's magento internal issue so please open this file




                          /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php




                          and check on on line 121, check the code where exception is throwing.
                          There must be directly string passed in exception so just make it like:




                          __("that exception here")




                          So simply means call this __(" ") there is two underscore in this function and paste that string in this function. This should be place in same place where directly sting is passed.



                          For eg:
                          If this was like




                          throw new Exception("can not delete item");




                          So it should be like




                          throw new Exception(__("can not delete item"));




                          Save and check if it's working. If this works then please create new module and use preference to override this file.
                          It's not recommend to work directly on magento core file.



                          This function is used for translation which return MagentoFrameworkPhrase object.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Mar 13 '18 at 8:14









                          Teja Bhagavan Kollepara

                          2,96341847




                          2,96341847










                          answered Dec 27 '17 at 17:17









                          Kumar MKumar M

                          67946




                          67946






























                              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%2f207314%2ferror-after-clear-basket%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

                              Alcázar de San Juan

                              Griza ansero

                              Heinkel He 51