Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: Order Confirmation Email Based on SkinID

  1. #1
    Mad Marcus is offline Junior Member
    Join Date
    Jan 2010
    Posts
    6

    Default Order Confirmation Email Based on SkinID

    Hi,

    I am trying to customize the order conformation email so that users that have a certain skin get additional email copies sent out.

    I have tried adding the following to the sendform.aspx.cs file right before the sendmail call but it doesn't work.

    // custom code
    if (SkinID = 7)
    {
    SendTo += ",address1@gmail.com,address2@hotmail.com";
    }
    // end custom code
    foreach (String s in SendTo.Replace(",", ";").Split(';'))
    {
    String s2 = s.Trim();
    if (AppLogic.AppConfig("GotOrderEMailFrom").Trim().Le ngth == 0 || s2.Length == 0)
    {
    throw new ArgumentException("Please run your store Configuration Wizard in your admin site, to properly setup all your store e-mail address AppConfig values!");
    }
    AppLogic.SendMail(Subject, FormContents, true, AppLogic.AppConfig("GotOrderEMailFrom"), AppLogic.AppConfig("GotOrderEMailFromName"), s2, s2, "", AppLogic.MailServer());

    Can anyone point me in the right direction?

  2. #2
    DanV's Avatar
    DanV is offline Ursus arctos horribilis
    Join Date
    Apr 2006
    Posts
    1,568

    Default

    SendForm.Aspx is only responsible for emailing HTML submit forms like the contact page. It is not used to send order confirmation emails. You would need to modify AppLogic.SendOrderEmail here:

    Code:
                    // send E-Mail notice to store admin:
                    if (ord.ReceiptEMailSentOn == System.DateTime.MinValue)
                    {
                        try
                        {
                            if (AppLogic.AppConfig("GotOrderEMailTo").Length != 0 && !AppLogic.AppConfigBool("TurnOffStoreAdminEMailNotifications"))
                            {
                                String SendToList = AppLogic.AppConfig("GotOrderEMailTo").Replace(",", ";");
                                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 { }
                    }

  3. #3
    Mad Marcus is offline Junior Member
    Join Date
    Jan 2010
    Posts
    6

    Default

    Thanks Dan but I guess that means I need the full code version in order to do that?

  4. #4
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    You would need the source code to make that change, yes.