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 3 of 3

Thread: Multiple email based on Customer Level

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

    Default Multiple email based on Customer Level

    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 { }
    }

  2. #2
    jsimacek is offline Senior Member
    Join Date
    Dec 2008
    Location
    Phoenix, AZ
    Posts
    373

    Default

    You have the right start, but this way you are rather limiting yourself and the cart's functionality...as well as having possibly unwanted emailing. I would suggest setting the emails up in the actual Customer Level table/object and sending based on the current customer's level to those emails you setup.
    Jan Simacek - Compunix, LLC
    AspDotNetStorefront trusted Devnet Partner and Reseller since 2005

    AspDotNetStorefront Mods and Add-Ons at http://www.ecommercecartmods.com/
    - Searching, Filtering and Sorting (like cSearch, Dealer Locator, Price Ranges, Blog)
    - Reports (like Cart Abandonment and Net Sales)
    - Customer Experience (like Question/Answers)
    - Site and Data Management (like Entity Product Mapper, Bulk Updaters, Make/Model/Year filters)

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

    Default

    Hi Jan,

    Thanks for the reply.

    Can you clarify about setting up the extra email addresses in the Customer Level table? Wouldn't this require a modification to the database structure and then significant code modifications to allow for the insert and retrieval of those addresses?

    I am also unsure what you mean by unwanted emailing and limiting the carts functionality. If the extra email addresses are only added to those Skin Id's or Customer Levels that need to get the extra notification how would there be unwanted emailing? Also how does this limit functionality?

    I appreciate your help.