1
  • What is the entity/class responsible for calculating the discount amount?
  • Where is this discount amount calculated?

1 Answer 1

2

It could be Magento\Quote\Model\Quote\Address\RulesApplier with its method applyRule() that calls setDiscountData() where the discount amount fields are setted.

$item->setDiscountAmount($discountData->getAmount());
$item->setBaseDiscountAmount($discountData->getBaseAmount());
$item->setOriginalDiscountAmount($discountData->getOriginalAmount());
$item->setBaseOriginalDiscountAmount($discountData->getBaseOriginalAmount());

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.