Skip to content

Can't observer 'checkout_submit_before' event in frontend event area. #7524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hostep opened this issue Nov 22, 2016 · 1 comment
Closed

Comments

@hostep
Copy link
Contributor

hostep commented Nov 22, 2016

Preconditions

  1. Magento CE 2.1.2
  2. PHP 7.0.12
  3. A store with some products and a way to create orders on the frontend

Steps to reproduce

  1. Create a new working module
  2. Add a file: etc/frontend/events.xml and etc/events.xml file
  3. In both files add an observer for the event checkout_submit_before (make sure they have a different name) and make it call a method which outputs something in a log file to see which of the two observers was called.
  4. Flush your caches
  5. Go to the frontend and place an order

Expected result

  1. There should be 2 entries in the logfile, one for the 'global' observer and one for the 'frontend' observer

Actual result

  1. There is only 1 entry in the logfile, the one for the 'global' observer, the one for the 'frontend' observer is missing

Discussion

I think this is a bug, but I'm not sure. If this is expected behavior I would have expected to find some documentation where this is being explained.

@hostep
Copy link
Contributor Author

hostep commented Nov 22, 2016

Of course, 5 minutes after creating this issue, I find this other issue which explains why it doesn't work: #1581
And after testing, it actually works like explained over there.

So this is clearly a documentation issue, because this webapi_rest event area is not mentioned in the docs currently...

Closing this issue, I'm going to open one over at the devdocs repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant