Commit aa73e0bc by dhn

运费规则修改

parent 78466352
...@@ -72,7 +72,8 @@ class Freeshipping extends \Magento\Shipping\Model\Carrier\AbstractCarrier imple ...@@ -72,7 +72,8 @@ class Freeshipping extends \Magento\Shipping\Model\Carrier\AbstractCarrier imple
*/ */
private function isFreeShippingRequired(RateRequest $request): bool private function isFreeShippingRequired(RateRequest $request): bool
{ {
$minSubtotal = $request->getPackageValueWithDiscount(); //$minSubtotal = $request->getPackageValueWithDiscount();
$minSubtotal = $request->getBaseSubtotalInclTax();
if ($request->getBaseSubtotalWithDiscountInclTax() if ($request->getBaseSubtotalWithDiscountInclTax()
&& $this->getConfigFlag('tax_including')) { && $this->getConfigFlag('tax_including')) {
$minSubtotal = $request->getBaseSubtotalWithDiscountInclTax(); $minSubtotal = $request->getBaseSubtotalWithDiscountInclTax();
...@@ -97,7 +98,6 @@ class Freeshipping extends \Magento\Shipping\Model\Carrier\AbstractCarrier imple ...@@ -97,7 +98,6 @@ class Freeshipping extends \Magento\Shipping\Model\Carrier\AbstractCarrier imple
$result = $this->_rateResultFactory->create(); $result = $this->_rateResultFactory->create();
$this->_updateFreeMethodQuote($request); $this->_updateFreeMethodQuote($request);
if ($request->getFreeShipping() || $this->isFreeShippingRequired($request)) { if ($request->getFreeShipping() || $this->isFreeShippingRequired($request)) {
/** @var \Magento\Quote\Model\Quote\Address\RateResult\Method $method */ /** @var \Magento\Quote\Model\Quote\Address\RateResult\Method $method */
$method = $this->_rateMethodFactory->create(); $method = $this->_rateMethodFactory->create();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment