an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > DotShoppingCart Suite > Adding more users to the order confirmation, or...
Last Post 8/14/2009 9:23:50 AM By lukezy. 7 replies.
7/21/2009 10:08:25 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Adding more users to the order confirmation, order update emails
Hey Luke,
 
I need to add more users to the list of order confirmation email and when the status of the order is changed (when the order is shipped and there are tracking numbers).
 
Right now site email address and customer gets the email when the order is placed and only customer gets the tracking number for the shipment in the email.
 
I created a role called Sales Rep earlier and each customer is assigned to a sales rep. I want the Sales Rep to get these emails too.
 
Which part of the code sends out these emails?
 
Thanks
 
 
7/21/2009 10:49:12 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Adding more users to the order confirmation, order update emails
It's in the OrderEmailProcessorProvider.cs of DotShoppingCart.Commercial.OrderPipeline project.
DotShoppingCart Staff
7/21/2009 11:39:51 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Adding more users to the order confirmation, order update emails
I don't think i have this project. Is it part of DotShoppingCart.Commercial.Base?
 
I couldn't find it in DotShoppingCart.Commercial.Core.
 
 
7/21/2009 11:49:06 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Adding more users to the order confirmation, order update emails
Ah, it's part of "DotShoppingCart Suite V3.0 Core Components Source Code". I though you already have it. You can purchase from here.
DotShoppingCart Staff
8/14/2009 8:42:09 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Adding more users to the order confirmation, order update emails
Hey Luke,
 
I did the change in OrderEmailProcessorProvider.cs
 
Which dll i need to replace in the main project to reflect these changes?
 
I couldn't find the DotShoppingcart.Commercial.OrderPipeline.dll in the Web Project.
8/14/2009 8:47:01 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Adding more users to the order confirmation, order update emails
It's windows service project. You just need to stop the orderpipeline service and copy the dll to OrderPipeline folder and then restart the service.
DotShoppingCart Staff
8/14/2009 9:22:05 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Adding more users to the order confirmation, order update emails
Hey Luke,
 
I did the changes and updated the orderpipeline.dll in Install/OrderPipeLine folder. I also restarted the ComOrderPipeline Service. The site stopped sending order confirmation emails. The order status was straight going to Order Delayed- Under Review. Not sure what the problem is.
 
Here are the changes that i did
 
 
public static void SendOrderEmail(string host, Order order, IConfigurationSource cfgSrc, string emailTemplate) {
            SiteConfigurationSection siteSection = (SiteConfigurationSection)cfgSrc.GetSection(SiteConfigurationSection.SectionName);
            StoreConfigurationSection storeSection = (StoreConfigurationSection)cfgSrc.GetSection(StoreConfigurationSection.SectionName);
            NameValueCollection tokens = CoreHelper.GetSiteTokens(siteSection);
            order.AddTokens(siteSection, tokens);
            List<string> bcc = new List<string>();
            bcc.Add(siteSection.SiteEmailAddress);
            newCustomerSource CS = new newCustomerSource();
            string salesRepID = CS.getSalesRepIDFromIntID(order.UserId);
            User salesRep = User.GetUser(salesRepID);
            bcc.Add(salesRep.Email);

            foreach (NamedConfigurationElement ccAddress in storeSection.OrderConfirmationEmailAddresses) {
                bcc.Add(ccAddress.Name);
            }
 
EmailManager.Send(host, emailTemplate, tokens, siteSection.SiteEmailAddress, new string[] { order.Email }, bcc);
 
}
 
 
 
Here is the function that returns the SalesRep ID
 
public string getSalesRepIDFromIntID(int userID)
        {
            string salesRepID = "";
            newCustomerDataSourceDataContext db = new newCustomerDataSourceDataContext(ConfigurationController.SiteConfigurationController.GetSiteConnectionString(SiteNavigation.GetHost()));
            var sRID = from d in db.DSC_Users
                       where d.userId == userID
                       select d;
            foreach (var x in sRID)
            {
                salesRepID = x.salesRep;
            }
            return salesRepID;
        }
 
 
Thanks
 
 
8/14/2009 9:23:50 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Adding more users to the order confirmation, order update emails
Check the eventlog for the exceptions.
DotShoppingCart Staff