Does spree send email after order placed?

456 views
Skip to first unread message

piot...@gmail.com

unread,
Jun 8, 2013, 7:39:48 PM6/8/13
to spree...@googlegroups.com
I am wondering if Spree sends email after an order is placed, or does it need something else.

Also I am creating a mail_method, but the problem is I do not know how to set it up
I have tried hooking it up to my personal gmail account via smtp but the send test email does not seem to work

Does anyone know how I would go about sending email after an order is placed as well as after a user registers. (I am currently in development mode)

Finally  I am using Spree 1.3.2- stable with some custom logic in checkout, line_item, order, order_updator, payment_method, and variant But i do not believe any of them should should cause any problems with sending order after it is done.

Washington Luiz

unread,
Jun 10, 2013, 10:23:19 AM6/10/13
to spree...@googlegroups.com
Hi

Take a look at the Order model finalize! method. That's where the emails is sent. That method is called every time an order changes to complete state. Your app should probably be sending that email already.

piot...@gmail.com

unread,
Jun 10, 2013, 11:59:35 AM6/10/13
to spree...@googlegroups.com
Well after I place the order (confirmation page) It stays in the balance due state. This means that it will never send an email? until one of of the employees changes state to complete?

Washington Luiz

unread,
Jun 10, 2013, 12:15:09 PM6/10/13
to spree...@googlegroups.com
aah sorry, you're right. You could try send that email from the CheckoutController, inside the order.completed? statement. That's the best place I can think of right now.
--
Washington L Braga Jr
web developer

piot...@gmail.com

unread,
Jun 10, 2013, 2:26:48 PM6/10/13
to spree...@googlegroups.com
Cool will try that out and get back to see how it works.
Reply all
Reply to author
Forward
0 new messages