discountFactory->create(); $quoteAmount = $this->priceCurrency->convert($rule->getDiscountAmount(), $item->getQuote()->getStore()); $discountData->setAmount($qty * $quoteAmount); $discountData->setBaseAmount($qty * $rule->getDiscountAmount()); return $discountData; } /** * @param float $qty * @param \Magento\SalesRule\Model\Rule $rule * @return float */ public function fixQuantity($qty, $rule) { $step = $rule->getDiscountStep(); if ($step) { $qty = floor($qty / $step) * $step; } return $qty; } }