We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent daff59a commit 3d13f78Copy full SHA for 3d13f78
app/code/Magento/OfflineShipping/Model/Carrier/Freeshipping.php
@@ -98,6 +98,20 @@ public function collectRates(RateRequest $request)
98
99
$result->append($method);
100
}
101
+ elseif ($this->getConfigData('showmethod'))
102
+ {
103
+ $error = $this->_rateErrorFactory->create();
104
+ $error->setCarrier($this->_code);
105
+ $error->setCarrierTitle($this->getConfigData('title'));
106
+ $errorMsg = $this->getConfigData('specificerrmsg');
107
+ $error->setErrorMessage(
108
+ $errorMsg ? $errorMsg : __(
109
+ 'Sorry, but we can\'t deliver to the destination country with this shipping module.'
110
+ )
111
+ );
112
+
113
+ return $error;
114
+ }
115
116
return $result;
117
0 commit comments