Hi,
We have a store (v 8.01) setup so that different customers see different products based on their customer level. They also have their own skin. But some customer levels need to have order email notifications sent to a number of addresses. I have tried customizing applogic.cs using the following and assuming that ord.SkinID contains the skin id for the current customer but the extra emails aren't being sent.
I don't think the SkinID is being retrieved as expected. We could even use the Customer Level Id if anyone knows how to reference it?
// send E-Mail notice to store admin:
if (ord.ReceiptEMailSentOn == System.DateTime.MinValue)
{
try
{
if (AppLogic.AppConfig("GotOrderEMailTo").Length != 0 && !AppLogic.AppConfigBool("TurnOffStoreAdminEMailNot ifications"))
{
String SendToList = AppLogic.AppConfig("GotOrderEMailTo").Replace(",", ";");
// Start Modified Code
int nmSkinID = ord.SkinID;
if (nmSkinID == 3)
{
SendToList += ";address1@gmail.com;address2@hotmail.com;address3 @yahoo.com";
}
// End Modified Code
if (SendToList.IndexOf(';') != -1)
{
foreach (String s in SendToList.Split(';'))
{
AppLogic.SendMail(SubjectNotification, ord.AdminNotification() + AppLogic.AppConfig("MailFooter"), true, AppLogic.AppConfig("GotOrderEMailFrom"), AppLogic.AppConfig("GotOrderEMailFromName"), s.Trim(), s.Trim(), String.Empty, AppLogic.MailServer());
}
}
else
{
AppLogic.SendMail(SubjectNotification, ord.AdminNotification() + AppLogic.AppConfig("MailFooter"), true, AppLogic.AppConfig("GotOrderEMailFrom"), AppLogic.AppConfig("GotOrderEMailFromName"), SendToList, SendToList, String.Empty, AppLogic.MailServer());
}
}
}
catch { }
}