error after clear basket
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

magento-2.1
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.
add a comment |
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

magento-2.1
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.
add a comment |
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

magento-2.1
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

magento-2.1
magento-2.1
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.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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.
add a comment |
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Dec 27 '17 at 19:21
SylvesterSylvester
675216
675216
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
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
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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