warehouse alert email

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
ryanstowasser
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 90
Joined: Tue Oct 30, 2007 4:28 pm
Contact:

warehouse alert email

Post by ryanstowasser » Mon Mar 09, 2009 3:33 pm

Warehouses have email addresses that are editable through the administration. How do I set up an order email alert to be sent when an order is placed that ships through a specific warehouse?

The keywords in the email template are customer and vendor, but could I add $warehouse.email ?

User avatar
ryanstowasser
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 90
Joined: Tue Oct 30, 2007 4:28 pm
Contact:

Re: warehouse alert email

Post by ryanstowasser » Wed Mar 11, 2009 1:52 pm

bump.

I'm still looking for a way to send emails to the relavent warehouse when an order is placed.

Thanks. :)

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: warehouse alert email

Post by nickc » Wed Mar 11, 2009 2:40 pm

If the warehouse id is arbitrary or external, you can get hold of the email this way:

Code: Select all

#set ($foo = YourWarehouseIdValue + 0 )
$store.Warehouses.get_item($store.Warehouses.IndexOf($foo)).Email
If you have a shipment object available, use:

Code: Select all

$shipment.Warehouse.Email

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: warehouse alert email

Post by nickc » Wed Mar 11, 2009 2:58 pm

Hmm. Might have misread your intent. You could inject some code into the "CheckedOut" method of OnePageCheckout.ascx.cs. You'd load the order, iterate each shipment (where you can read the warehouse email) and send mail. Able's email templating is available in CommerceBuilder.Messaging:

Code: Select all

    EmailTemplate message = new EmailTemplate();
    message.Load(messageId);
    message.AddToAddress(email);
    message.Parameters["templateparameter"] = value;
    message.Send();
In this example, "$templateparameter" in the email template would evaluate to the assignment above.

hbcondo
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 28
Joined: Tue Jan 20, 2009 3:52 pm

Re: warehouse alert email

Post by hbcondo » Sat Apr 04, 2009 4:46 pm

Hi, I am running AbleCommerce 7.0.2 build 11659 and I don't see a way to notify a warehouse via e-mail that an order has been placed. Other than using the code shown in the forum post, shouldn't there be a way to configure this in the admin tool?

Post Reply