Post by mikememike » Sat Jan 11, 2014 3:55 am

Hi!

I'm writing a shipping module. How can I execute a script (.php file) after the checkout is confirmed (for example, send an e-mail)?
This has to be an extension so I cannot write the code in success.php file.

Thank's!

Newbie

Posts

Joined
Sat Jan 11, 2014 3:49 am

Post by pedro1993 » Sat Jan 11, 2014 4:49 am

Shipping methods PHP files are always executed when the user reaches the shipping stage in the checkout. Your only option is to add some code in the success.php file.

Remember you can use vQmod if you don't want to overwrite any code changes :)

Peter

For OpenCart & PHP/MySQL support feel free to PM me :)
Click here for my extentions
Did I help you? Donate here to show support


Active Member

Posts

Joined
Tue Oct 18, 2011 4:31 am
Location - Glasgow, Scotland

Post by mikememike » Sat Jan 11, 2014 4:50 am

Thank you, Peter!

Newbie

Posts

Joined
Sat Jan 11, 2014 3:49 am

Post by MarketInSG » Sat Jan 11, 2014 11:48 pm

alternative way would be to add that to the confirm function in model/checkout/order.php. That will ensure no one triggers your success.php easily without any order, and you always have the right order details


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore
Who is online

Users browsing this forum: No registered users and 1 guest