Example #1
0
        public string FindHightlightColorForOrder(OrderSnapshot o)
        {
            string result = "";

            if (o == null)
            {
                return(result);
            }
            if (o.ShippingMethodId.Trim().Length < 1)
            {
                return(result);
            }
            var m = ShippingMethods.Find(o.ShippingMethodId.Trim());

            if (m == null)
            {
                return(result);
            }
            string highlight = m.Settings.GetSettingOrEmpty("highlight");

            if (highlight.Trim().Length > 0)
            {
                return(highlight);
            }
            return(result);
        }
Example #2
0
        public string FindHighlightForOrder(OrderSnapshot order)
        {
            if (order == null || string.IsNullOrWhiteSpace(order.ShippingMethodId))
            {
                return(null);
            }
            var method = ShippingMethods.Find(order.ShippingMethodId.Trim());

            if (method == null)
            {
                return(null);
            }

            var highlight = method.Settings.GetSettingOrEmpty("highlight");

            return(highlight);
        }