0

I have added a BIN promotion which is needed to be applied just before payment directly on order.

I have found 2 methods that apply discount but require a quote object.

\Magento\SalesRule\Model\Validator::canApplyDiscount

\Magento\SalesRule\Model\Validator::process

Have anyone directly applied on the order object?

1
  • 1
    In Magento 2, the order model is a barely changeable quote representation that should not be manipulated manually after placement. This approach could saves you from the hassle of collecting totals and arranging invoices. I suggest to manipulate your quote just before placing instead of the order itself.
    – dudzio
    May 18 at 7:53
0

As far as I know, Magento already supports this function.

You can create cart price rules on the Magento admin page.

Log in to your Admin panel and navigate to Marketing > Promotions > Cart Price Rule.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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