News:

Support the VirtueMart project and become a member

Main Menu

New trigger for registration

Started by pinochico, November 23, 2020, 20:49:10 PM

Previous topic - Next topic

pinochico

This is a question for true connoisseurs / developers:

Starting with VM 3.8.4, the VM core development team changed the VM core code and moved the trigger for sending emails after user registration from the shopfunction.php file to the user.php model (perhaps for improved security?) With the words - This is life (Thanks Andrey :)

Now we need to return this feature, preferably using a trigger back to its original location to maintain the functionality of our 3d party extensions.

We have several options and we don't like either one very much (I'm not sure if I'll write them correctly):
- write a new system plugin that overrides the core VM model user - after each new version of the VM we have to release a new version again and again
- when installing our extension, load the core file of the user.php model and rewrite only those lines with the original code for sending emails to our code and save
- copy the whole user.php model to our extension (about 700 lines) and change it only by sending mails via sendVmMail ().
- break the treasury and pay to Max money to return the function
- break the treasury and pay to Max money to insert a new trigger into the user.php model

Can you advise me which variant is best to choose and where can I find more detailed information with an example?

Thank you for your time and direction
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products