your order has been shipped Bug

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
15 years ago
hi, got bug shipping details missing-


Order Number: 10
Order Details: http://www.nop.mysite.net/OrderDetails.aspx?OrderID=10
Date Ordered: Monday, December 29, 2008



Billing Address
mark rolo
4
Manchester sk5
GBR



Shipping Address
%Order.ShippingFirstName% %Order.ShippingLastName%
%Order.ShippingAddress1%
%Order.ShippingCity% %Order.ShippingZipPostalCode%
%Order.ShippingStateProvince% %Order.ShippingCountry%

Shipping Method: By Ground

Payment Method: Manual Processing
15 years ago
Got this as well.

Seems that:

MessageManager.SendOrderShippedCustomerNotification(order);

calls:

string body = ReplaceMessageTemplateTokens(order, messageTemplate.Body);

But "ReplaceMessageTemplateTokens" does not contain any tokens for the Shipping fields (so they are not replaced):


        public static string ReplaceMessageTemplateTokens(Order order, string Template)
        {
            NameValueCollection tokens = new NameValueCollection();
            tokens.Add("Store.Name", SettingManager.GetSettingValue("Common.StoreName"));
            tokens.Add("Store.URL", SettingManager.GetSettingValue("Common.StoreURL"));
            tokens.Add("Store.Email", AdminEmailAddress);
            
            tokens.Add("Order.OrderNumber", order.OrderID.ToString());
            tokens.Add("Order.PaymentMethod", order.PaymentMethodName);
            tokens.Add("Order.ShippingMethod", order.ShippingMethod);
            tokens.Add("Order.BillingFirstName", order.BillingFirstName);
            tokens.Add("Order.BillingLastName", order.BillingLastName);
            tokens.Add("Order.BillingPhoneNumber", order.BillingPhoneNumber);
            tokens.Add("Order.BillingEmail", order.BillingEmail.ToString());
            tokens.Add("Order.BillingFaxNumber", order.BillingFaxNumber);
            tokens.Add("Order.BillingCompany", order.BillingCompany);
            tokens.Add("Order.BillingAddress1", order.BillingAddress1);
            tokens.Add("Order.BillingAddress2", order.BillingAddress2);
            tokens.Add("Order.BillingCity", order.BillingCity);
            tokens.Add("Order.BillingStateProvince", order.BillingStateProvince);
            tokens.Add("Order.BillingZipPostalCode", order.BillingZipPostalCode);
            tokens.Add("Order.BillingCountry", order.BillingCountry);
            tokens.Add("Order.CreatedOn", order.CreatedOn.ToString("D"));
            tokens.Add("Order.OrderTotal", String.Format("{0} ({1})", order.OrderTotalInCustomerCurrency.ToString("N"), order.CustomerCurrencyCode));
            tokens.Add("Order.OrderURLForCustomer", string.Format("{0}/OrderDetails.aspx?OrderID={1}", SettingManager.GetSettingValue("Common.StoreURL"), order.OrderID));

            foreach (string token in tokens.Keys)
                Template = Template.Replace(string.Format(@"%{0}%", token), tokens[token]);

            return Template;
        }


Expect this will be fixed in new version??

Thanks,

Ben
15 years ago
Yes. Look at http://forums.nopcommerce.com/forums/default.aspx?g=posts&t=161 this topic
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.