VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: bganek on January 09, 2012, 18:03:06 PM

Title: What routine/page is used to place the final order
Post by: bganek on January 09, 2012, 18:03:06 PM
Hello,

We would like to add something to our ERP database when an order is placed in VM but I'm having trouble finding the code where the order is completed on the VM side and stored in mySQL.  Can someone steer me in the right direction?

Thanks,

Bruce
Title: Re: What routine/page is used to place the final order
Post by: JtouchMobile.com on January 10, 2012, 05:08:23 AM
Here you are:
/components/com_virtuemart/controllers/cart.php
function: private function confirmedOrder()


But why not write a separated script (say, scron job) -> detect changes in VM order table -> port to your ERP db?
Or a plgVmConfirmedOrder plugin.. 
Title: Re: What routine/page is used to place the final order
Post by: bganek on January 10, 2012, 17:23:00 PM
Thanks.  I see a "confirm" not a "ConfirmOrder" function in that file, I'm assuming that's the one.

We are trying to keep it more real time, rather than using cron jobs if possible, cron jobs is the fallback position.
I'm not familiar enough with plugins yet to know if that's an option for me here (I'm moving to PHP - am a C# programmer right now).

Thanks again.