Hello. I'm planning tie a SMS notification logics to a moment when customers order is submitted. I've tired to look up a good spot somewhere in /components/com_virtuemart/controllers/cart.php but was not able to spot anything related to order submission process. While I understand that such endeavor should be carried out via development of a full fledged plugin for VM, the functionality I need to inject is rather simple and won't be much of a hassle to reinstall during VM updates.
Could anyone point me to a proper spot in the VirtueMart codebase where customer order get verified and submitted?
You can modify this plugin for your needs https://shop.st42.fr/en/tools/truspilot-auto-mail.htm
In the controller, it's not safe. You should directly write it in the views/cart/tmpl/order_done.php if you really want to hack the core, or do an override in your template is better
Maybe is better created new system plugin and use trigger etc. ConfirmOrder ?
On our eshops a lot of customers don't use order_done.php, because the pay by payment agregator (for credit cards, bank transfer, internet banking, google pay...) and after finished not redirect back to order_done.php
Thanks for the tips. Placing it into orderdone view override worked quite well. As for the possible problems with no correct redirect back to the store, I'll definitely keep an eye on that one but currently all of our online payment procedures work as intended by VM order processing workflow.
QuoteI'll definitely keep an eye on that one but currently all of our online payment procedures work as intended by VM order processing workflow.
You are lucky :)