VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Abatap on April 27, 2020, 16:04:37 PM

Title: SMS notification intergration on order submit
Post by: Abatap on April 27, 2020, 16:04:37 PM
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?
Title: Re: SMS notification intergration on order submit
Post by: Studio 42 on April 27, 2020, 16:41:05 PM
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
Title: Re: SMS notification intergration on order submit
Post by: pinochico on April 27, 2020, 16:49:51 PM
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
Title: Re: SMS notification intergration on order submit
Post by: Abatap on April 28, 2020, 11:11:40 AM
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.
Title: Re: SMS notification intergration on order submit
Post by: pinochico on April 28, 2020, 11:22:04 AM
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 :)