Skip to content

Commit 19a3666

Browse files
authored
Merge pull request #99 from ratepay/M2-126_Fehler_beim_Auswerten_der_Basket_Limits
M2-126 : Fix wrong profile max limit used to validate backend orders
2 parents 7f7df13 + dbde8ae commit 19a3666

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Model/Entities/ProfileConfiguration.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public function isApplicableForQuote(\Magento\Quote\Api\Data\CartInterface $oQuo
283283
}
284284

285285
// if multishipping mode is used and profile does not support ALA it cant be used
286-
if ($oQuote && $oQuote->getIsMultiShipping() && $this->getProductData("delivery_address_?", $sMethodCode, true) == false) {
286+
if ($oQuote && $oQuote->getIsMultiShipping() && $this->getProductData("delivery_address_?", $sProduct, true) == false) {
287287
return false;
288288
}
289289

@@ -302,10 +302,10 @@ public function isApplicableForQuote(\Magento\Quote\Api\Data\CartInterface $oQuo
302302
return false;
303303
}
304304

305-
$dMinAmount = $this->getProductData("tx_limit_?_min", $sMethodCode, true);
306-
$dMaxAmount = $this->getProductData("tx_limit_?_max", $sMethodCode, true);
307-
if ($oQuote && !empty($oQuote->getBillingAddress()->getCompany()) && ((bool)$this->getProductData("b2b_?", $sMethodCode, true) === true && ($dTotalAmount === null || $dTotalAmount <= $this->getProductData("tx_limit_?_max_b2b", $sMethodCode)))) {
308-
$dMaxAmount = $this->getProductData("tx_limit_?_max_b2b", $sMethodCode, true);
305+
$dMinAmount = $this->getProductData("tx_limit_?_min", $sProduct, true);
306+
$dMaxAmount = $this->getProductData("tx_limit_?_max", $sProduct, true);
307+
if ($oQuote && !empty($oQuote->getBillingAddress()->getCompany()) && ((bool)$this->getProductData("b2b_?", $sProduct, true) === true && ($dTotalAmount === null || $dTotalAmount <= $this->getProductData("tx_limit_?_max_b2b", $sProduct)))) {
308+
$dMaxAmount = $this->getProductData("tx_limit_?_max_b2b", $sProduct, true);
309309
}
310310

311311
if ($oQuote && $oQuote->getIsMultiShipping()) {

0 commit comments

Comments
 (0)