Beispiel #1
0
        public static string GetCode(Product product)
        {
            var style = product.GetSpecialStyle();
            var sale = product.GetActiveSale();

            string prodCode = prefix;

            prodCode += string.Format("-p{0}", Encode(product.Id));

            if (style != null)
            {
                if (!prodCode.IsEmpty()) prodCode += "-";
                prodCode += style.GetCode();
            }

            if (sale != null)
            {
                if (!prodCode.IsEmpty()) prodCode += "-";
                prodCode += sale.GetCode();
            }

            return prodCode;
        }
Beispiel #2
0
        public void ApplyStyles(Product product, BegemotProduct bproduct, Adv24au adv = null)
        {
            Marketplace market = adv.Marketplace;

            var specialStyle = product.GetSpecialStyle();
            var saleStyle = product.GetSaleStyle();
            var marketStyle = market == null ? null : market.GetActiveStyle();

            ApplyStyles(product, bproduct, specialStyle, saleStyle, marketStyle, market, adv);
        }
Beispiel #3
0
 private static MarketCategory GetMarketCategory(Product product)
 {
     MarketCategory result;
     var style = product.GetSpecialStyle();
     if (style == null)
     {
         result = MarketCategory.Default;
     }
     else
     {
         result = style.DefMarketCategoryObj;
     }
     return result;
 }