Shipping an order through code doesn't fire email trigger

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Shipping an order through code doesn't fire email trigger

Post by AbleMods » Mon Jan 18, 2010 11:31 am

I've got a project where I've automated shipment postings through code.

As a result, the code manages the shipment record just like the Able code does including a call to _OrderShipment.Ship(); at the end.

However the client is reporting my shipment code works flawlessly but the order-shipment email never fires. Manually shipping an order does fire the email off, but not if my code ships the order.

The order status goes to shipped as it should. The shipment record and tracking records are setup like they should. Any thoughts on what would cause this scenario?
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Shipping an order through code doesn't fire email trigger

Post by mazhar » Tue Jan 19, 2010 8:18 am

Its a wild guess that have a look on your shipment data and make sure that this information shipment.Order, shipment.Order.User and shipment.Order.Payments is populated as it should. If system is triggering Email on manual shipment then it sounds like in custom code you are missing something that is required.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Shipping an order through code doesn't fire email trigger

Post by AbleMods » Tue Jan 19, 2010 10:09 am

Thanks Mazhar. I agree.

I dug through the code a couple of times, comparing directly to the AC7 ship code. It's not on my end.

Customer later responded their triggers weren't working right. So for now everyone is presuming it's an issue in their setup and not my code.

Automatic processing of shipments and tracking info was tricky - figuring out how to determine which items shipped versus which should be moved to a new shipment record was surprisingly complex.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply