/// <summary>
		/// Set product variant info based on the variant already in the order
		/// </summary>
		/// <param name="productVariant">The product variant.</param>
		/// <param name="product">The product.</param>
		/// <param name="productVat">The product vat.</param>
		public ProductVariantInfo(OrderedProductVariant productVariant, ProductInfo product, decimal productVat)
		{
			Product = product;
			
			Id = productVariant.VariantId;
			Title = productVariant.Title;
			SKU = productVariant.SKU;
			Group = productVariant.Group;
			Weight = productVariant.Weight;
			Length = productVariant.Length;
			Height = productVariant.Height;
			Width = productVariant.Width;
			PriceInCents = productVariant.PriceInCents;
			RangesString = productVariant.RangesString;
			ChangedOn = DateTime.Now;
			Vat = productVat;
			DiscountAmountInCents = productVariant.DiscountAmount;
			DiscountPercentage = productVariant.DiscountPercentage;

			DocTypeAlias = productVariant.TypeAlias ?? productVariant.DocTypeAlias;
		}
Пример #2
0
        /// <summary>
        /// Set product variant info based on the variant already in the order
        /// </summary>
        /// <param name="productVariant">The product variant.</param>
        /// <param name="product">The product.</param>
        /// <param name="productVat">The product vat.</param>
        public ProductVariantInfo(OrderedProductVariant productVariant, ProductInfo product, decimal productVat)
        {
            Product = product;

            Id                    = productVariant.VariantId;
            Title                 = productVariant.Title;
            SKU                   = productVariant.SKU;
            Group                 = productVariant.Group;
            Weight                = productVariant.Weight;
            Length                = productVariant.Length;
            Height                = productVariant.Height;
            Width                 = productVariant.Width;
            PriceInCents          = productVariant.PriceInCents;
            RangesString          = productVariant.RangesString;
            ChangedOn             = DateTime.Now;
            Vat                   = productVat;
            DiscountAmountInCents = productVariant.DiscountAmount;
            DiscountPercentage    = productVariant.DiscountPercentage;

            DocTypeAlias = productVariant.TypeAlias ?? productVariant.DocTypeAlias;
        }