Thanis Posted October 11, 2021 Share Posted October 11, 2021 Is there any way to use the events emit on bundle.js files, outside from a module ? 1.7.8 Support EventEmitter on Backoffice. I am able to emit new events but i cannot use subscribed events like "productUpdated", "productAddedToOrder" etc. Thank you!! Link to comment Share on other sites More sharing options...
Vexx00 Posted January 5 Share Posted January 5 (edited) I'm also looking for this. However I could not even emit new events, because I don't know how to access the EventEmitter offered by prestashop directly. I'm looking to instantiate Grid javascript functionalities from the global 'prestashop' object, which are only available after a while. I'd need to instantiate Grid components after this event is triggered: EventEmitter.on('PSComponentsInitiated', () => { [...] }) but I need the EventEmitter js library in my code. I wish I could access EventEmitter directly from prestashop like so: window.prestashop.component.EventEmitter but it's not possible, since the very same EventEmitter is loaded along with the other js components... Bummer, I guess I'll need to load EventEmitter by my own.. Edited January 5 by Vexx00 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now