Skip to content
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

Wrong event name for new address and login trigger not working #3071

Closed
vinyl919 opened this issue Jun 1, 2015 · 6 comments
Closed

Wrong event name for new address and login trigger not working #3071

vinyl919 opened this issue Jun 1, 2015 · 6 comments

Comments

@vinyl919
Copy link

vinyl919 commented Jun 1, 2015

Hi,
Event name for add new address should be post.customer.add.address (catalog/model/account/address.php, line 4), not like given post.customer.address.add.
Also it seems that post.customer.login to not working properly. I've added trigger code in catalog/controller/account/login.php, line 55. Now it seems to work correctly. Before that it was not triggering any action.

@niyazhussain
Copy link

good work

@milimar
Copy link

milimar commented Jun 3, 2015

@vinyl919 why don't you share with us the trigger code? I might help us...

@jamesallsup
Copy link
Contributor

catalog/model/account/address.php, line 4 is the PRE event, line 14 is the POST event, working ok on my tests.

Pre events happen before data is modified / action is taken, post events happen after.

@vinyl919
Copy link
Author

vinyl919 commented Jun 4, 2015

Yes, the address trigger working fine. What I mean was that it is a mistake in documentation. Event name in file is "post.customer.add.address" and "pre.customer.add.address", but in documentation it is "post.customer.address.add" and "pre.customer.address.add". It is just a wrong order of words:)

@madhurjain It is just code from line 10 of catalog/controller/account/login.php - "$this->event->trigger('pre.customer.login');"

@jamesallsup
Copy link
Contributor

OK great, that's updated now in the docs.

Thanks.

@vinyl919
Copy link
Author

vinyl919 commented Jun 5, 2015

I'm going to use a lot of triggers now, so maybe if I find any issues I will post them here.
Another one mistake in docs is twice "pre.customer.newsletter.edit", one of them should be "post.customer.newsletter.edit" :)

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

4 participants