I'm working on module which generates the coupon code in its 'fulfill' feature. Everything works beautifully but my plan was to send the coupon code to the customer in the order confirmation email which is generated by another module's 'fulfill' feature.
In the sources for miva I didn't find the implementation for StoreModuleList_Load_Feature function, so I poked around the database structure in hopes of finding anything that would control the priority for modules so they're called in a particular order (i.e. first the coupon is created then email is sent). No luck there.
My ideas at this point are (in order of increasing awkwardness):
- implement coupon generation as log feature hooked to 'AUTH' Action
- uninstall email module and re-install it again so it is picked after my module in unsorted result
- implement coupon generation in component call referenced in email template
Do I have any less hack-y options at this time?
In the sources for miva I didn't find the implementation for StoreModuleList_Load_Feature function, so I poked around the database structure in hopes of finding anything that would control the priority for modules so they're called in a particular order (i.e. first the coupon is created then email is sent). No luck there.
My ideas at this point are (in order of increasing awkwardness):
- implement coupon generation as log feature hooked to 'AUTH' Action
- uninstall email module and re-install it again so it is picked after my module in unsorted result
- implement coupon generation in component call referenced in email template
Do I have any less hack-y options at this time?
Comment