0

I want to check additional checking with the product that has already been added in the cart, is there any method of event observers for doing this, our intention is to find out the customer who has added the product when it is in offer time frame, and after that time frame they should not want to proceed check out that product.

3
  • 1
    how about this event controller_action_predispatch
    – Naveenbos
    Jul 19, 2017 at 8:38
  • Yes. that will work too.
    – Mike
    Jul 19, 2017 at 8:44
  • I got this controller_action_predispatch_checkout_index_index
    – Naveenbos
    Jul 19, 2017 at 13:01

1 Answer 1

1

To do some logic before placing the order, you can use the event

sales_model_service_quote_submit_before

available in /Magento/Quote/Model/QuoteManagement before placing the order.

Or in worst case, you can also override the /Magento/Checkout/Controller/Onepage/SaveOrder Controller, do your stuff before the line $this->getOnepage()->saveOrder(); which is responsible for saving the order.

1
  • 1
    @Naveen have you tried this?
    – Mike
    Jul 19, 2017 at 9:52

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.