public void Can_delete_mappings_for_entity()
        {
            var product = new Product { Id = 5 };

            _service.DeleteSyncMappingsFor(product);
            _rs.Table.Count().ShouldEqual(38);
        }
        public void Entity_should_not_equal_transient_entity() {
            
            var p1 = new Product { Id = 1 };
            var p2 = new Product();

            Assert.AreNotEqual(p1, p2, "Entity and transient entity should not be equal");
        }
        public void Entities_with_different_id_should_not_be_equal() {
            
            var p1 = new Product { Id = 2 };
            var p2 = new Product { Id = 5 };

            Assert.AreNotEqual(p1, p2, "Entities with different ids should not be equal");
        }
        public void Two_transient_entities_should_not_be_equal() {
            
            var p1 = new Product();
            var p2 = new Product();

            Assert.AreNotEqual(p1, p2, "Different transient entities should not be equal");
        }
        public void Two_references_to_same_transient_entity_should_be_equal() {
            
            var p1 = new Product();
            var p2 = p1;

            Assert.AreEqual(p1, p2, "Two references to the same transient entity should be equal");
        }
        public void Entities_with_same_id_but_different_type_should_not_be_equal() {
            int id = 10;
            var p1 = new Product { Id = id };

            var c1 = new Category { Id = id };

            Assert.AreNotEqual(p1, c1, "Entities of different types should not be equal, even if they have the same id");
        }
 public void Can_check_taxExempt_product()
 {
     var product = new Product();
     product.IsTaxExempt = true;
     _taxService.IsTaxExempt(product, null).ShouldEqual(true);
     product.IsTaxExempt = false;
     _taxService.IsTaxExempt(product, null).ShouldEqual(false);
 }
        public void Two_references_with_the_same_id_should_be_equal() {
            
            int id = 10;
            var p1 = new Product { Id = id };
            var p2 = new Product { Id = id };

            Assert.AreEqual(p1, p2, "Entities with the same id should be equal");
        }
        public virtual void CreateAllProductVariantAttributeCombinations(Product product)
        {
            // delete all existing combinations
            foreach(var itm in product.ProductVariantAttributeCombinations)
            {
                DeleteProductVariantAttributeCombination(itm);
            }

            var attributes = GetProductVariantAttributesByProductId(product.Id);
            if (attributes == null || attributes.Count <= 0)
                return;

            var toCombine = new List<List<ProductVariantAttributeValue>>();
            var resultMatrix = new List<List<ProductVariantAttributeValue>>();
            var tmp = new List<ProductVariantAttributeValue>();

            foreach (var attr in attributes)
            {
                var attributeValues = attr.ProductVariantAttributeValues.ToList();
                if (attributeValues.Count > 0)
                    toCombine.Add(attributeValues);
            }

            if (toCombine.Count > 0)
            {
                CombineAll(toCombine, resultMatrix, 0, tmp);

                foreach (var values in resultMatrix)
                {
                    string attrXml = "";
                    foreach (var x in values)
                    {
                        attrXml = attributes[values.IndexOf(x)].AddProductAttribute(attrXml, x.Id.ToString());
                    }

                    var combination = new ProductVariantAttributeCombination
                    {
                        ProductId = product.Id,
                        AttributesXml = attrXml,
                        StockQuantity = 10000,
                        AllowOutOfStockOrders = true,
                        IsActive = true
                    };

                    _productVariantAttributeCombinationRepository.Insert(combination);
                    _eventPublisher.EntityInserted(combination);
                }
            }

            //foreach (var y in resultMatrix) {
            //	StringBuilder sb = new StringBuilder();
            //	foreach (var x in y) {
            //		sb.AppendFormat("{0} ", x.Name);
            //	}
            //	sb.ToString().Dump();
            //}
        }
Exemplo n.º 10
0
        public void Can_load_mapping_by_entity()
        {
            var product = new Product { Id = 5 };

            var mapping = _service.GetSyncMappingByEntity(product, "App2");
            Assert.NotNull(mapping);
            mapping.EntityName.ShouldEqual("Product");
            mapping.EntityId.ShouldEqual(5);
            mapping.SourceKey.ShouldEqual("e5");
        }
        public void Equality_works_using_operators() {

            var p1 = new Product { Id = 1 };
            var p2 = new Product { Id = 1 };

            Assert.IsTrue(p1 == p2);

            var p3 = new Product();

            Assert.IsTrue(p1 != p3);
        }
		public void Can_parse_required_product_ids()
		{
			var product = new Product
			{
				RequiredProductIds = "1, 4,7 ,a,"
			};

			var ids = product.ParseRequiredProductIds();
			ids.Length.ShouldEqual(3);
			ids[0].ShouldEqual(1);
			ids[1].ShouldEqual(4);
			ids[2].ShouldEqual(7);
		}
        public void Can_parse_allowed_quantities()
        {
            var product = new Product()
            {
                AllowedQuantities = "1, 5,4,10,sdf"
            };

            var result = product.ParseAllowedQuatities();
            result.Length.ShouldEqual(4);
            result[0].ShouldEqual(1);
            result[1].ShouldEqual(5);
            result[2].ShouldEqual(4);
            result[3].ShouldEqual(10);
        }
        /// <summary>
        /// Gets allowed discounts
        /// </summary>
		/// <param name="product">Product</param>
        /// <param name="customer">Customer</param>
        /// <returns>Discounts</returns>
        protected virtual IList<Discount> GetAllowedDiscounts(Product product, Customer customer)
        {
            var allowedDiscounts = new List<Discount>();
            if (_catalogSettings.IgnoreDiscounts)
                return allowedDiscounts;

			if (product.HasDiscountsApplied)
            {
                //we use this property ("HasDiscountsApplied") for performance optimziation to avoid unnecessary database calls
				foreach (var discount in product.AppliedDiscounts)
                {
					if (_discountService.IsDiscountValid(discount, customer) &&
						discount.DiscountType == DiscountType.AssignedToSkus &&
						!allowedDiscounts.ContainsDiscount(discount))
					{
						allowedDiscounts.Add(discount);
					}
                }
            }

            //performance optimization
            //load all category discounts just to ensure that we have at least one
            if (_discountService.GetAllDiscounts(DiscountType.AssignedToCategories).Any())
            {
				var productCategories = _categoryService.GetProductCategoriesByProductId(product.Id);
                if (productCategories != null)
                {
                    foreach (var productCategory in productCategories)
                    {
                        var category = productCategory.Category;

                        if (category.HasDiscountsApplied)
                        {
                            //we use this property ("HasDiscountsApplied") for performance optimziation to avoid unnecessary database calls
                            var categoryDiscounts = category.AppliedDiscounts;
                            foreach (var discount in categoryDiscounts)
                            {
								if (_discountService.IsDiscountValid(discount, customer) &&
									discount.DiscountType == DiscountType.AssignedToCategories &&
									!allowedDiscounts.ContainsDiscount(discount))
								{
									allowedDiscounts.Add(discount);
								}
                            }
                        }
                    }
                }
            }
            return allowedDiscounts;
        }
        public void Can_get_final_product_price_with_additionalFee()
        {
            var product = new Product
            {
                Id = 1,
                Name = "Product name 1",
                Price = 12.34M,
                CustomerEntersPrice = false,
                Published = true,
            };

            //customer
            Customer customer = null;

            _priceCalcService.GetFinalPrice(product, customer, 5, false, 1).ShouldEqual(17.34M);
        }
        public void CanCreateFastPropertyByName()
        {
            var fastProp = FastProperty.GetProperty(typeof(Product), "Name", PropertyCachingStrategy.Cached);
            fastProp.ShouldNotBeNull();

            Assert.AreEqual(fastProp.Property.Name, "Name");

            // from cache
            var fastProp2 = FastProperty.GetProperty<Product>(x => x.Name);
            Assert.AreSame(fastProp, fastProp2);

            var product = new Product { Name = "MyName" };
            var name = fastProp.GetValue(product);

            Assert.AreEqual("MyName", name);
        }
		public void Can_save_and_load_product_with_tierPrices()
		{
			var product = new Product
			{
				Name = "Product name 1",
				CreatedOnUtc = new DateTime(2010, 01, 03),
				UpdatedOnUtc = new DateTime(2010, 01, 04),
			};
			product.TierPrices.Add
			(
				new TierPrice
				{
					Quantity = 1,
					Price = 2,
				}
			);
			var fromDb = SaveAndLoadEntity(product);
			fromDb.ShouldNotBeNull();
			fromDb.Name.ShouldEqual("Product name 1");

			fromDb.TierPrices.ShouldNotBeNull();
			(fromDb.TierPrices.Count == 1).ShouldBeTrue();
			fromDb.TierPrices.First().Quantity.ShouldEqual(1);
		}
        public void Can_save_and_load_product_with_productTags()
        {
            var product = new Product
            {
                Name = "Name 1",
                Published = true,
                Deleted = false,
                CreatedOnUtc = new DateTime(2010, 01, 01),
                UpdatedOnUtc = new DateTime(2010, 01, 02)
            };
            product.ProductTags.Add
                (
                    new ProductTag
                    {
                        Name = "Tag name 1"
                    }
                );
            var fromDb = SaveAndLoadEntity(product);
            fromDb.ShouldNotBeNull();
            fromDb.Name.ShouldEqual("Name 1");


            fromDb.ProductTags.ShouldNotBeNull();
            (fromDb.ProductTags.Count == 1).ShouldBeTrue();
            fromDb.ProductTags.First().Name.ShouldEqual("Tag name 1");
        }
        public void Can_save_and_load_product_with_productPictures()
        {
            var product = new Product
            {
                Name = "Name 1",
                Published = true,
                Deleted = false,
                CreatedOnUtc = new DateTime(2010, 01, 01),
                UpdatedOnUtc = new DateTime(2010, 01, 02)
            };
            product.ProductPictures.Add
                (
                    new ProductPicture
                    {
                        DisplayOrder = 1,
                        Picture = new Picture()
                        {
                            PictureBinary = new byte[] { 1, 2, 3 },
                            MimeType = "image/pjpeg",
                            IsNew = true
                        }
                    }
                );
            var fromDb = SaveAndLoadEntity(product);
            fromDb.ShouldNotBeNull();
            fromDb.Name.ShouldEqual("Name 1");

            fromDb.ProductPictures.ShouldNotBeNull();
            (fromDb.ProductPictures.Count == 1).ShouldBeTrue();
            fromDb.ProductPictures.First().DisplayOrder.ShouldEqual(1);

            fromDb.ProductPictures.First().Picture.ShouldNotBeNull();
            fromDb.ProductPictures.First().Picture.MimeType.ShouldEqual("image/pjpeg");
        }
        public void Can_save_and_load_product_with_productManufacturers()
        {
            var product = new Product
            {
                Name = "Name 1",
                Published = true,
                Deleted = false,
                CreatedOnUtc = new DateTime(2010, 01, 01),
                UpdatedOnUtc = new DateTime(2010, 01, 02)
            };
            product.ProductManufacturers.Add
                (
                    new ProductManufacturer
                    {
                        IsFeaturedProduct = true,
                        DisplayOrder = 1,
                        Manufacturer = new Manufacturer()
                        {
                            Name = "Name",
                            Description = "Description 1",
                            MetaKeywords = "Meta keywords",
                            MetaDescription = "Meta description",
                            MetaTitle = "Meta title",
                            //PictureId = 3,
                            PageSize = 4,
                            PriceRanges = "1-3;",
                            Published = true,
                            Deleted = false,
                            DisplayOrder = 5,
                            CreatedOnUtc =
                                new DateTime(2010, 01, 01),
                            UpdatedOnUtc =
                                new DateTime(2010, 01, 02),
                        }
                    }
                );
            var fromDb = SaveAndLoadEntity(product);
            fromDb.ShouldNotBeNull();
            fromDb.Name.ShouldEqual("Name 1");

            fromDb.ProductManufacturers.ShouldNotBeNull();
            (fromDb.ProductManufacturers.Count == 1).ShouldBeTrue();
            fromDb.ProductManufacturers.First().IsFeaturedProduct.ShouldEqual(true);

            fromDb.ProductManufacturers.First().Manufacturer.ShouldNotBeNull();
            fromDb.ProductManufacturers.First().Manufacturer.Name.ShouldEqual("Name");
        }
        public void Can_save_and_load_product()
        {
            var product = new Product
            {
				ProductType = ProductType.GroupedProduct,
				ParentGroupedProductId = 2,
				VisibleIndividually = true,
                Name = "Name 1",
                ShortDescription = "ShortDescription 1",
                FullDescription = "FullDescription 1",
                AdminComment = "AdminComment 1",
                ProductTemplateId = 1,
                ShowOnHomePage = false,
                MetaKeywords = "Meta keywords",
                MetaDescription = "Meta description",
                MetaTitle = "Meta title",
                AllowCustomerReviews = true,
                ApprovedRatingSum = 2,
                NotApprovedRatingSum = 3,
                ApprovedTotalReviews = 4,
                NotApprovedTotalReviews = 5,
                SubjectToAcl = true,
				LimitedToStores = true,
				Sku = "sku 1",
				ManufacturerPartNumber = "manufacturerPartNumber",
				Gtin = "gtin 1",
				IsGiftCard = true,
				GiftCardTypeId = 1,
				IsDownload = true,
				DownloadId = 2,
				UnlimitedDownloads = true,
				MaxNumberOfDownloads = 3,
				DownloadExpirationDays = 4,
				DownloadActivationTypeId = 5,
				HasSampleDownload = true,
				//SampleDownloadId = 6,
				HasUserAgreement = true,
				UserAgreementText = "userAgreementText",
				IsRecurring = true,
				RecurringCycleLength = 7,
				RecurringCyclePeriodId = 8,
				RecurringTotalCycles = 9,
				IsShipEnabled = true,
				IsFreeShipping = true,
				AdditionalShippingCharge = 10.1M,
				IsTaxExempt = true,
				TaxCategoryId = 11,
				ManageInventoryMethodId = 12,
				StockQuantity = 13,
				DisplayStockAvailability = true,
				DisplayStockQuantity = true,
				MinStockQuantity = 14,
				LowStockActivityId = 15,
				NotifyAdminForQuantityBelow = 16,
				BackorderModeId = 17,
				AllowBackInStockSubscriptions = true,
				OrderMinimumQuantity = 18,
				OrderMaximumQuantity = 19,
				AllowedQuantities = "1, 5,6,10",
				DisableBuyButton = true,
				DisableWishlistButton = true,
				AvailableForPreOrder = true,
				CallForPrice = true,
				Price = 21.1M,
				OldPrice = 22.1M,
				ProductCost = 23.1M,
				SpecialPrice = 32.1M,
				SpecialPriceStartDateTimeUtc = new DateTime(2010, 01, 05),
				SpecialPriceEndDateTimeUtc = new DateTime(2010, 01, 06),
				CustomerEntersPrice = true,
				MinimumCustomerEnteredPrice = 24.1M,
				MaximumCustomerEnteredPrice = 25.1M,
				HasTierPrices = true,
				HasDiscountsApplied = true,
				Weight = 26.1M,
				Length = 27.1M,
				Width = 28.1M,
				Height = 29.1M,
				AvailableStartDateTimeUtc = new DateTime(2010, 01, 01),
				AvailableEndDateTimeUtc = new DateTime(2010, 01, 02),
				RequireOtherProducts = true,
				RequiredProductIds = "1,2,3",
				AutomaticallyAddRequiredProducts = true,
				DisplayOrder = 30,
                Published = true,
                Deleted = false,
                CreatedOnUtc = new DateTime(2010, 01, 01),
                UpdatedOnUtc = new DateTime(2010, 01, 02),
            };

            var fromDb = SaveAndLoadEntity(product);
            fromDb.ShouldNotBeNull();
			fromDb.ProductType.ShouldEqual(ProductType.GroupedProduct);
			fromDb.ParentGroupedProductId.ShouldEqual(2);
			fromDb.VisibleIndividually.ShouldEqual(true);
            fromDb.Name.ShouldEqual("Name 1");
            fromDb.ShortDescription.ShouldEqual("ShortDescription 1");
            fromDb.FullDescription.ShouldEqual("FullDescription 1");
            fromDb.AdminComment.ShouldEqual("AdminComment 1");
            fromDb.ProductTemplateId.ShouldEqual(1);
            fromDb.ShowOnHomePage.ShouldEqual(false);
            fromDb.MetaKeywords.ShouldEqual("Meta keywords");
            fromDb.MetaDescription.ShouldEqual("Meta description");
            fromDb.AllowCustomerReviews.ShouldEqual(true);
            fromDb.ApprovedRatingSum.ShouldEqual(2);
            fromDb.NotApprovedRatingSum.ShouldEqual(3);
            fromDb.ApprovedTotalReviews.ShouldEqual(4);
            fromDb.NotApprovedTotalReviews.ShouldEqual(5);
            fromDb.SubjectToAcl.ShouldEqual(true);
			fromDb.LimitedToStores.ShouldEqual(true);
			fromDb.ShouldNotBeNull();
			fromDb.Sku.ShouldEqual("sku 1");
			fromDb.ManufacturerPartNumber.ShouldEqual("manufacturerPartNumber");
			fromDb.Gtin.ShouldEqual("gtin 1");
			fromDb.IsGiftCard.ShouldEqual(true);
			fromDb.GiftCardTypeId.ShouldEqual(1);
			fromDb.IsDownload.ShouldEqual(true);
			fromDb.DownloadId.ShouldEqual(2);
			fromDb.UnlimitedDownloads.ShouldEqual(true);
			fromDb.MaxNumberOfDownloads.ShouldEqual(3);
			fromDb.DownloadExpirationDays.ShouldEqual(4);
			fromDb.DownloadActivationTypeId.ShouldEqual(5);
			fromDb.HasSampleDownload.ShouldEqual(true);
			//fromDb.SampleDownloadId.ShouldEqual(6);
			fromDb.HasUserAgreement.ShouldEqual(true);
			fromDb.UserAgreementText.ShouldEqual("userAgreementText");
			fromDb.IsRecurring.ShouldEqual(true);
			fromDb.RecurringCycleLength.ShouldEqual(7);
			fromDb.RecurringCyclePeriodId.ShouldEqual(8);
			fromDb.RecurringTotalCycles.ShouldEqual(9);
			fromDb.IsShipEnabled.ShouldEqual(true);
			fromDb.IsFreeShipping.ShouldEqual(true);
			fromDb.AdditionalShippingCharge.ShouldEqual(10.1M);
			fromDb.IsTaxExempt.ShouldEqual(true);
			fromDb.TaxCategoryId.ShouldEqual(11);
			fromDb.ManageInventoryMethodId.ShouldEqual(12);
			fromDb.StockQuantity.ShouldEqual(13);
			fromDb.DisplayStockAvailability.ShouldEqual(true);
			fromDb.DisplayStockQuantity.ShouldEqual(true);
			fromDb.MinStockQuantity.ShouldEqual(14);
			fromDb.LowStockActivityId.ShouldEqual(15);
			fromDb.NotifyAdminForQuantityBelow.ShouldEqual(16);
			fromDb.BackorderModeId.ShouldEqual(17);
			fromDb.AllowBackInStockSubscriptions.ShouldEqual(true);
			fromDb.OrderMinimumQuantity.ShouldEqual(18);
			fromDb.OrderMaximumQuantity.ShouldEqual(19);
			fromDb.AllowedQuantities.ShouldEqual("1, 5,6,10");
			fromDb.DisableBuyButton.ShouldEqual(true);
			fromDb.DisableWishlistButton.ShouldEqual(true);
			fromDb.AvailableForPreOrder.ShouldEqual(true);
			fromDb.CallForPrice.ShouldEqual(true);
			fromDb.Price.ShouldEqual(21.1M);
			fromDb.OldPrice.ShouldEqual(22.1M);
			fromDb.ProductCost.ShouldEqual(23.1M);
			fromDb.SpecialPrice.ShouldEqual(32.1M);
			fromDb.SpecialPriceStartDateTimeUtc.ShouldEqual(new DateTime(2010, 01, 05));
			fromDb.SpecialPriceEndDateTimeUtc.ShouldEqual(new DateTime(2010, 01, 06));
			fromDb.CustomerEntersPrice.ShouldEqual(true);
			fromDb.MinimumCustomerEnteredPrice.ShouldEqual(24.1M);
			fromDb.MaximumCustomerEnteredPrice.ShouldEqual(25.1M);
			fromDb.HasTierPrices.ShouldEqual(true);
			fromDb.HasDiscountsApplied.ShouldEqual(true);
			fromDb.Weight.ShouldEqual(26.1M);
			fromDb.Length.ShouldEqual(27.1M);
			fromDb.Width.ShouldEqual(28.1M);
			fromDb.Height.ShouldEqual(29.1M);
			fromDb.AvailableStartDateTimeUtc.ShouldEqual(new DateTime(2010, 01, 01));
			fromDb.AvailableEndDateTimeUtc.ShouldEqual(new DateTime(2010, 01, 02));
			fromDb.RequireOtherProducts.ShouldEqual(true);
			fromDb.RequiredProductIds.ShouldEqual("1,2,3");
			fromDb.AutomaticallyAddRequiredProducts.ShouldEqual(true);
			fromDb.DisplayOrder.ShouldEqual(30);
            fromDb.Published.ShouldEqual(true);
            fromDb.Deleted.ShouldEqual(false);
            fromDb.CreatedOnUtc.ShouldEqual(new DateTime(2010, 01, 01));
            fromDb.UpdatedOnUtc.ShouldEqual(new DateTime(2010, 01, 02));
        }
        public virtual void AddProductTokens(IList<Token> tokens, Product product, int languageId)
        {
            tokens.Add(new Token("Product.ID", product.Id.ToString()));
            tokens.Add(new Token("Product.Sku", product.Sku));
            tokens.Add(new Token("Product.Name", product.GetLocalized(x => x.Name, languageId)));
            tokens.Add(new Token("Product.ShortDescription", product.GetLocalized(x => x.ShortDescription, languageId), true));
            tokens.Add(new Token("Product.StockQuantity", product.StockQuantity.ToString()));

            // TODO: add a method for getting URL (use routing because it handles all SEO friendly URLs)
            var productUrl = string.Format("{0}{1}", _webHelper.GetStoreLocation(false), product.GetSeName());
            tokens.Add(new Token("Product.ProductURLForCustomer", productUrl, true));

            //event notification
            _eventPublisher.EntityTokensAdded(product, tokens);
        }
        public virtual int SendProductQuestionMessage(Customer customer, int languageId, Product product, 
            string senderEmail, string senderName, string senderPhone, string question)
        {
            if (customer == null)
                throw new ArgumentNullException("customer");

            if (customer.IsSystemAccount)
                return 0;

            if (product == null)
                throw new ArgumentNullException("product");
			
			var store = _storeContext.CurrentStore;
            languageId = EnsureLanguageIsActive(languageId, store.Id);
			
            var messageTemplate = GetLocalizedActiveMessageTemplate("Product.AskQuestion", languageId, store.Id);
            if (messageTemplate == null)
                return 0;

			var tokens = new List<Token>();
			_messageTokenProvider.AddStoreTokens(tokens, store);
			_messageTokenProvider.AddCustomerTokens(tokens, customer);
			_messageTokenProvider.AddProductTokens(tokens, product, languageId);

			tokens.Add(new Token("ProductQuestion.Message", question, true));
            tokens.Add(new Token("ProductQuestion.SenderEmail", senderEmail));
            tokens.Add(new Token("ProductQuestion.SenderName", senderName));
            tokens.Add(new Token("ProductQuestion.SenderPhone", senderPhone));

            //event notification
            _eventPublisher.MessageTokensAdded(messageTemplate, tokens);

            var emailAccount = GetEmailAccountOfMessageTemplate(messageTemplate, languageId);
            var toEmail = emailAccount.Email;
            var toName = emailAccount.DisplayName;

            return SendNotification(messageTemplate, emailAccount, languageId, tokens, toEmail, toName, senderEmail, senderName);
        }
        /// <summary>
        /// Sends a "quantity below" notification to a store owner
        /// </summary>
		/// <param name="product">Product</param>
        /// <param name="languageId">Message language identifier</param>
        /// <returns>Queued email identifier</returns>
		public virtual int SendQuantityBelowStoreOwnerNotification(Product product, int languageId)
        {
            if (product == null)
                throw new ArgumentNullException("product");

			var store = _storeContext.CurrentStore;
            languageId = EnsureLanguageIsActive(languageId, store.Id);

			var messageTemplate = GetLocalizedActiveMessageTemplate("QuantityBelow.StoreOwnerNotification", languageId, store.Id);
			if (messageTemplate == null)
                return 0;

			var tokens = new List<Token>();
			_messageTokenProvider.AddStoreTokens(tokens, store);
			_messageTokenProvider.AddProductTokens(tokens, product, languageId);

            //event notification
            _eventPublisher.MessageTokensAdded(messageTemplate, tokens);

            var emailAccount = GetEmailAccountOfMessageTemplate(messageTemplate, languageId);
            var toEmail = emailAccount.Email;
            var toName = emailAccount.DisplayName;
            return SendNotification(messageTemplate, emailAccount,
                languageId, tokens,
                toEmail, toName);
        }
        /// <summary>
        /// Sends "email a friend" message
        /// </summary>
        /// <param name="customer">Customer instance</param>
        /// <param name="languageId">Message language identifier</param>
        /// <param name="product">Product instance</param>
        /// <param name="customerEmail">Customer's email</param>
        /// <param name="friendsEmail">Friend's email</param>
        /// <param name="personalMessage">Personal message</param>
        /// <returns>Queued email identifier</returns>
        public virtual int SendProductEmailAFriendMessage(Customer customer, int languageId,
            Product product, string customerEmail, string friendsEmail, string personalMessage)
        {
            if (customer == null)
                throw new ArgumentNullException("customer");

            if (product == null)
                throw new ArgumentNullException("product");

			var store = _storeContext.CurrentStore;
			languageId = EnsureLanguageIsActive(languageId, store.Id);
            
			var messageTemplate = GetLocalizedActiveMessageTemplate("Service.EmailAFriend", languageId, store.Id);
			if (messageTemplate == null)
                return 0;

			//tokens
			var tokens = new List<Token>();
			_messageTokenProvider.AddStoreTokens(tokens, store);
			_messageTokenProvider.AddCustomerTokens(tokens, customer);
			_messageTokenProvider.AddProductTokens(tokens, product, languageId);
			tokens.Add(new Token("EmailAFriend.PersonalMessage", personalMessage, true));
			tokens.Add(new Token("EmailAFriend.Email", customerEmail));

            //event notification
            _eventPublisher.MessageTokensAdded(messageTemplate, tokens);

            var emailAccount = GetEmailAccountOfMessageTemplate(messageTemplate, languageId);
            var toEmail = friendsEmail;
            var toName = "";
            return SendNotification(messageTemplate, emailAccount,
                languageId, tokens,
                toEmail, toName);
        }
Exemplo n.º 26
0
 /// <summary>
 /// Gets discount amount
 /// </summary>
 /// <param name="product">Product</param>
 /// <returns>Discount amount</returns>
 public virtual decimal GetDiscountAmount(Product product)
 {
     var customer = _services.WorkContext.CurrentCustomer;
     return GetDiscountAmount(product, customer, decimal.Zero);
 }
Exemplo n.º 27
0
        /// <summary>
        /// Finds a product variant attribute combination by attributes stored in XML 
        /// </summary>
        /// <param name="product">Product</param>
        /// <param name="attributesXml">XML formatted attributes</param>
        /// <returns>Found product variant attribute combination</returns>
        public static ProductVariantAttributeCombination FindProductVariantAttributeCombination(
			this IProductAttributeParser service, 
			Product product, 
			string attributesXml,
			IEnumerable<ProductVariantAttribute> attributes = null)
        {
            Guard.ArgumentNotNull(() => product);

            return service.FindProductVariantAttributeCombination(product.Id, attributesXml, attributes);
        }
Exemplo n.º 28
0
 /// <summary>
 /// Gets discount amount
 /// </summary>
 /// <param name="product">Product</param>
 /// <param name="customer">The customer</param>
 /// <returns>Discount amount</returns>
 public virtual decimal GetDiscountAmount(Product product, 
     Customer customer)
 {
     return GetDiscountAmount(product, customer, decimal.Zero);
 }
		public IList<Product> Products()
		{
			#region definitions

			//pictures
			var sampleImagesPath = this._sampleImagesPath;

			//downloads
			var sampleDownloadsPath = this._sampleDownloadsPath;

			//templates
			var productTemplateSimple = _ctx.Set<ProductTemplate>().First(x => x.ViewPath == "ProductTemplate.Simple");
			var productTemplateGrouped = _ctx.Set<ProductTemplate>().First(x => x.ViewPath == "ProductTemplate.Grouped");

			var firstDeliveryTime = _ctx.Set<DeliveryTime>().First(sa => sa.DisplayOrder == 0);

			#endregion definitions

			#region category Gift Cards

			#region product5GiftCard

			var product5GiftCard = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "$5 Virtual Gift Card",
				ShortDescription = "$5 Gift Card. Gift Cards must be redeemed through our site Web site toward the purchase of eligible products.",
				FullDescription = "<p>Gift Cards must be redeemed through our site Web site toward the purchase of eligible products. Purchases are deducted from the GiftCard balance. Any unused balance will be placed in the recipient's GiftCard account when redeemed. If an order exceeds the amount of the GiftCard, the balance must be paid with a credit card or other available payment method.</p>",
                Sku = "P-1000",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "$5 Virtual Gift Card",
				Price = 5M,
				IsGiftCard = true,
				GiftCardType = GiftCardType.Virtual,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false
			};


			//var productTag = _productTagRepository.Table.Where(pt => pt.Name == "gift").FirstOrDefault();
			//productTag.ProductCount++;
			//productTag.Products.Add(product5GiftCard);
			//_productTagRepository.Update(productTag);

			product5GiftCard.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "product_5giftcart.jpeg"), "image/jpeg", GetSeName(product5GiftCard.Name)),
				DisplayOrder = 1,
			});

			#endregion product5GiftCard

			#region product25GiftCard

			var product25GiftCard = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "$25 Virtual Gift Card",
				ShortDescription = "$25 Gift Card. Gift Cards must be redeemed through our site Web site toward the purchase of eligible products.",
				FullDescription = "<p>Gift Cards must be redeemed through our site Web site toward the purchase of eligible products. Purchases are deducted from the GiftCard balance. Any unused balance will be placed in the recipient's GiftCard account when redeemed. If an order exceeds the amount of the GiftCard, the balance must be paid with a credit card or other available payment method.</p>",
                Sku = "P-1001",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "$25 Virtual Gift Card",
				Price = 25M,
				IsGiftCard = true,
				GiftCardType = GiftCardType.Virtual,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false
			};

			product25GiftCard.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "product_25giftcart.jpeg"), "image/jpeg", GetSeName(product25GiftCard.Name)),
				DisplayOrder = 1,
			});

			#endregion product25GiftCard

			#region product50GiftCard

			var product50GiftCard = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "$50 Virtual Gift Card",
				ShortDescription = "$50 Gift Card. Gift Cards must be redeemed through our site Web site toward the purchase of eligible products.",
				FullDescription = "<p>Gift Cards must be redeemed through our site Web site toward the purchase of eligible products. Purchases are deducted from the GiftCard balance. Any unused balance will be placed in the recipient's GiftCard account when redeemed. If an order exceeds the amount of the GiftCard, the balance must be paid with a credit card or other available payment method.</p>",
                Sku = "P-1002",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "$50 Virtual Gift Card",
				Price = 50M,
				IsGiftCard = true,
				GiftCardType = GiftCardType.Virtual,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false
			};

			product50GiftCard.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "product_50giftcart.jpeg"), "image/jpeg", GetSeName(product50GiftCard.Name)),
				DisplayOrder = 1,
			});

			#endregion product50GiftCard

			#endregion category Gift Cards

			#region category books

			#region productBooksUberMan

			var productBooksUberMan = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Überman: The novel",
				ShortDescription = "(Hardcover)",
				FullDescription = "<p>From idiots to riches - and back ... Ever since it with my Greek financial advisors were no more delicious cookies to meetings, I should have known something. Was the last cookie it when I bought a Romanian forest funds and leveraged discount certificates on lean hogs - which is sort of a more stringent bet that the price of lean hogs will remain stable, and that's nothing special because it is also available for cattle and cotton and fat pig. Again and again and I joked Kosmas Nikiforos Sarantakos. About all the part-time seer who tremblingly put for fear the euro crisis gold coins under the salami slices of their frozen pizzas And then came the day that revealed to me in almost Sarantakos fraudulent casualness that my plan had not worked out really. 'Why all of a sudden> my plan', 'I heard myself asking yet, but it was in the garage I realized what that really meant minus 211.2 percent in my portfolio report: personal bankruptcy, gutter and Drug Addiction with subsequent loss of the incisors . Not even the study of my friend, I would still be able to finance. The only way out was to me as quickly as secretly again to draw from this unspeakable Greek shit - I had to be Überman! By far the bekloppteste story about 'idiot' Simon Peter! »Tommy Jaud – Deutschlands witzigste Seite.« Alex Dengler, Bild am Sonntag</p>",
                Sku = "P-1003",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Überman: The novel",
				Price = 16.99M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true
			};

			//pictures
			productBooksUberMan.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000932_uberman-der-roman.jpeg"), "image/jpeg", GetSeName(productBooksUberMan.Name)),
				DisplayOrder = 1,
			});

			//attributes
			productBooksUberMan.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Edition -> bound
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 13).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productBooksUberMan.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Category -> bound
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 14).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 7).Single()
			});
			productBooksUberMan.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Language -> German
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 12).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			#endregion productBooksUberMan

			#region productBooksGefangeneDesHimmels

			var productBooksGefangeneDesHimmels = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "The Prisoner of Heaven: A Novel",
				ShortDescription = "(Hardcover)",
				FullDescription = "<p>By Shadow of the Wind and The Angel's Game, the new large-Barcelona novel by Carlos Ruiz Zafón. - Barcelona, Christmas 1957th The bookseller Daniel Sempere and his friend Fermín be drawn again into a great adventure. In the continuation of his international success with Carlos Ruiz Zafón takes the reader on a fascinating journey into his Barcelona. Creepy and fascinating, with incredible suction power and humor, the novel, the story of Fermin, who 'rose from the dead, and the key to the future is.' Fermin's life story linking the threads of The Shadow of the Wind with those from The Angel's Game. A masterful puzzle that keeps the reader around the world in thrall. </p> <p> Product Hardcover: 416 pages Publisher: S. Fischer Verlag; 1 edition (October 25, 2012) Language: German ISBN-10: 3,100,954,025 ISBN-13: 978-3100954022 Original title: El prisionero del cielo Size and / or weight: 21.4 x 13.6 cm x 4.4 </p>",
				ProductTemplateId = productTemplateSimple.Id,
                Sku = "P-1004",
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "The Prisoner of Heaven: A Novel",
				Price = 22.99M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 0).Single()
			};

			//pictures
			productBooksGefangeneDesHimmels.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000935_der-gefangene-des-himmels-roman_300.jpeg"), "image/jpeg", GetSeName(productBooksGefangeneDesHimmels.Name)),
				DisplayOrder = 1,
			});

			//attributes
			productBooksGefangeneDesHimmels.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Edition -> bound
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 13).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productBooksGefangeneDesHimmels.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Category -> bound
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 14).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 7).Single()
			});
			productBooksGefangeneDesHimmels.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Language -> German
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 12).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});

			#endregion productBooksGefangeneDesHimmels

			#region productBooksBestGrillingRecipes

			var productBooksBestGrillingRecipes = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Best Grilling Recipes",
				ShortDescription = "More Than 100 Regional Favorites Tested and Perfected for the Outdoor Cook (Hardcover)",
				FullDescription = "<p> Take a winding cross-country trip and you'll discover barbecue shacks with offerings like tender-smoky Baltimore pit beef and saucy St. Louis pork steaks. To bring you the best of these hidden gems, along with all the classics, the editors of Cook's Country magazine scoured the country, then tested and perfected their favorites. HEre traditions large and small are brought into the backyard, from Hawaii's rotisserie favorite, the golden-hued Huli Huli Chicken, to fall-off-the-bone Chicago Barbecued Ribs. In Kansas City, they're all about the sauce, and for our saucy Kansas City Sticky Ribs, we found a surprise ingredient-root beer. We also tackle all the best sides. </p> <p> Not sure where or how to start? This cookbook kicks off with an easy-to-follow primer that will get newcomers all fired up. Whether you want to entertain a crowd or just want to learn to make perfect burgers, Best Grilling Recipes shows you the way. </p>",
				ProductTemplateId = productTemplateSimple.Id,
                Sku = "P-1005",
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Best Grilling Recipes",
				Price = 27.00M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 0).Single()
			};

			//pictures
			productBooksBestGrillingRecipes.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000937_best-grilling-recipes.jpeg"), "image/jpeg", GetSeName(productBooksBestGrillingRecipes.Name)),
				DisplayOrder = 1,
			});

			//attributes
			productBooksBestGrillingRecipes.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Edition -> bound
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 13).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productBooksBestGrillingRecipes.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Category -> cook & bake
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 14).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 8).Single()
			});
			productBooksBestGrillingRecipes.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Language -> German
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 12).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 2).Single()
			});

			#endregion productBooksBestGrillingRecipes

			#region productBooksCookingForTwo

			var productBooksCookingForTwo = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Cooking for Two",
				ShortDescription = "More Than 200 Foolproof Recipes for Weeknights and Special Occasions (Hardcover)",
				FullDescription = "<p>In Cooking for Two, the test kitchen's goal was to take traditional recipes and cut them down to size to serve just twowith tailored cooking techniques and smart shopping tips that will cut down on wasted food and wasted money. Great lasagna starts to lose its luster when you're eating the leftovers for the fourth day in a row. While it may seem obvious that a recipe for four can simply be halved to work, our testing has proved that this is not always the case; cooking with smaller amounts of ingredients often requires different preparation techniques, cooking time, temperature, and the proportion of ingredients. This was especially true as we worked on scaled-down desserts; baking is an unforgiving science in which any changes in recipe amounts often called for changes in baking times and temperatures. </p> <p> Hardcover: 352 pages<br> Publisher: America's Test Kitchen (May 2009)<br> Language: English<br> ISBN-10: 1933615435<br> ISBN-13: 978-1933615431<br> </p>",
				ProductTemplateId = productTemplateSimple.Id,
                Sku = "P-1006",
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Cooking for Two",
				Price = 27.00M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 1).Single()
			};

			//pictures
			productBooksCookingForTwo.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000938_cooking-for-two.jpeg"), "image/jpeg", GetSeName(productBooksCookingForTwo.Name)),
				DisplayOrder = 1,
			});

			//attributes
			productBooksCookingForTwo.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Edition -> bound
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 13).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productBooksCookingForTwo.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Category -> cook & bake
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 14).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 8).Single()
			});
			productBooksCookingForTwo.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Language -> German
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 12).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 2).Single()
			});

			#endregion productBooksCookingForTwo

			#region productBooksAutosDerSuperlative

			var productBooksAutosDerSuperlative = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Car of superlatives: the strongest, the first, the most beautiful, the fastest",
				ShortDescription = "Hardcover",
				FullDescription = "<p> For some, the car is only a useful means of transportation. For everyone else, there are 'cars - The Ultimate Guide' of art-connoisseur Michael Doerflinger. With authentic images, all important data and a lot of information can be presented to the fastest, most innovative, the strongest, the most unusual and the most successful examples of automotive history. A comprehensive manual for the specific reference and extensive browsing. </p>",
                Sku = "P-1007",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Car of superlatives",
				Price = 14.95M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 2).Single()
			};

			//pictures
			productBooksAutosDerSuperlative.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000944_autos-der-superlative-die-starksten-die-ersten-die-schonsten-die-schnellsten.jpeg"), "image/jpeg", GetSeName(productBooksAutosDerSuperlative.Name)),
				DisplayOrder = 1,
			});

			//attributes
			productBooksAutosDerSuperlative.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Edition -> bound
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 13).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productBooksAutosDerSuperlative.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Category -> cars
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 14).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 6).Single()
			});
			productBooksAutosDerSuperlative.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Language -> German
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 12).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});


			#endregion productBooksAutosDerSuperlative

			#region productBooksBildatlasMotorraeder

			var productBooksBildatlasMotorraeder = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Picture Atlas Motorcycles: With more than 350 brilliant images",
				ShortDescription = "Hardcover",
				FullDescription = "<p> Motorcycles are like no other means of transportation for the great dream of freedom and adventure. This richly illustrated atlas image portrayed in brilliant color photographs and informative text, the most famous bikes of the world's motorcycle history. From the primitive steam engine under the saddle of the late 19th Century up to the hugely powerful, equipped with the latest electronics and computer technology superbikes of today he is an impressive picture of the development and fabrication of noble and fast-paced motorcycles. The myth of the motorcycle is just as much investigated as a motorcycle as a modern lifestyle product of our time. Country-specific, company-historical background information and interesting stories and History about the people who preceded drove one of the seminal inventions of recent centuries and evolved, make this comprehensive illustrated book an incomparable reference for any motorcycle enthusiast and technology enthusiasts. </p> <p> • Extensive history of the legendary models of all major motorcycle manufacturers worldwide<br> • With more than 350 brilliant color photographs and fascinating background information relating<br> • With informative drawings, stunning detail shots and explanatory info-boxes<br> </p> <p> content • 1817 1913: The beginning of a success story<br> • 1914 1945: mass mobility<br> • 1946 1990: Battle for the World Market<br> • In 1991: The modern motorcycle<br> • motorcycle cult object: From Transportation to Lifestyle<br> </p>",
                Sku = "P-1008",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Picture Atlas Motorcycles",
				Price = 14.99M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 0).Single()
			};

			//pictures
			productBooksBildatlasMotorraeder.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000942_bildatlas-motorrader-mit-mehr-als-350-brillanten-abbildungen.jpeg"), "image/jpeg", GetSeName(productBooksBildatlasMotorraeder.Name)),
				DisplayOrder = 1,
			});

			//attributes
			productBooksBildatlasMotorraeder.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Edition -> bound
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 13).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productBooksBildatlasMotorraeder.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Category -> non-fiction
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 14).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 9).Single()
			});
			productBooksBildatlasMotorraeder.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Language -> German
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 12).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});

			#endregion productBooksBildatlasMotorraeder

			#region productBooksAutoBuch

			var productBooksAutoBuch = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "The Car Book. The great history with over 1200 models",
				ShortDescription = "Hardcover",
				FullDescription = "<p> Makes, models, milestones<br> The car - for some, a utensil for other expression of lifestyle, cult object and passion. Few inventions have changed their lives as well as the good of the automobile 125 years ago - one more reason for this extensive chronicle. The car-book brings the history of the automobile to life. It presents more than 1200 important models - Karl Benz 'Motorwagen about legendary cult car to advanced hybrid vehicles. It explains the milestones in engine technology and portrays the big brands and their designers. Characteristics from small cars to limousines and send racing each era invite you to browse and discover. The most comprehensive and bestbebildert illustrated book on the market - it would be any car lover! </p> <p> Hardcover: 360 pages<br> Publisher: Dorling Kindersley Publishing (September 27, 2012)<br> Language: German<br> ISBN-10: 3,831,022,062<br> ISBN-13: 978-3831022069<br> Size and / or weight: 30.6 x 25.8 x 2.8 cm<br> </p>",
                Sku = "P-1009",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "The Car Book",
				Price = 29.95M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 0).Single()
			};

			//pictures
			productBooksAutoBuch.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000947_das-auto-buch-die-grose-chronik-mit-uber-1200-modellen_300.jpeg"), "image/jpeg", GetSeName(productBooksAutoBuch.Name)),
				DisplayOrder = 1,
			});

			//attributes
			productBooksAutoBuch.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Edition -> bound
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 13).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productBooksAutoBuch.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Category -> non-fiction
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 14).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 9).Single()
			});
			productBooksAutoBuch.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Language -> German
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 12).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});

			#endregion productBooksAutoBuch

			#region productBooksFastCars

			var productBooksFastCars = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Fast Cars, Image Calendar 2013",
				ShortDescription = "spiral bound",
				FullDescription = "<p> Large Size: 48.5 x 34 cm.<br> This impressive picture calendar with silver ring binding thrilled with impressive photographs of exclusive sports cars. Who understands cars not only as a pure commercial vehicles, will find the most sought-after status symbols at all: fast cars are effectively set to the razor sharp and vivid photos in scene and convey freedom, speed, strength and the highest technical perfection. Starting with the 450-horsepower Maserati GranTurismo MC Stradale on the stylish, luxurious Aston Martin Virage Volante accompany up to the produced only in small numbers Mosler Photon MT900S the fast racer with style and elegance through the months. </p> <p> Besides the calendar draws another picture to look at interesting details. There are the essential information on any sports car in the English language. After this year, the high-quality photos are framed an eye-catcher on the wall of every lover of fast cars. Even as a gift this beautiful years companion is wonderfully suited. 12 calendar pages, neutral and discreet held calendar. Printed on paper from sustainable forests. For lovers of luxury vintage cars also available in ALPHA EDITION: the large format image Classic Cars Calendar 2013: ISBN 9,783,840,733,376th </p> <p> Spiral-bound: 14 pages<br> Publisher: Alpha Edition (June 1, 2012)<br> Language: German<br> ISBN-10: 3,840,733,383<br> ISBN-13: 978-3840733383<br> Size and / or weight: 48.8 x 34.2 x 0.6 cm<br> </p>",
                Sku = "P-1010",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Fast Cars",
				Price = 16.95M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 0).Single()
			};

			//pictures
			productBooksFastCars.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000946_fast-cars-bildkalender-2013_300.jpeg"), "image/jpeg", GetSeName(productBooksFastCars.Name)),
				DisplayOrder = 1,
			});

			//attributes
			productBooksFastCars.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Edition -> bound
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 13).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productBooksFastCars.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Category -> cars
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 14).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 6).Single()
			});
			productBooksFastCars.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Language -> German
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 12).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});

			#endregion productBooksFastCars

			#region productBooksMotorradAbenteuer

			var productBooksMotorradAbenteuer = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Motorcycle Adventures: Riding for travel enduros",
				ShortDescription = "Hardcover",
				FullDescription = "<p> Modern travel enduro bikes are ideal for adventure travel. Their technique is complex, their weight considerably. The driving behavior changes depending on the load and distance. </p> <p> Before the tour starts, you should definitely attend a training course. This superbly illustrated book presents practical means of many informative series photos the right off-road driving in mud and sand, gravel and rock with and without luggage. In addition to the driving course full of information and tips on choosing the right motorcycle for travel planning and practical issues may be on the way. </p>",
                Sku = "P-1011",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Motorcycle Adventures",
				Price = 24.90M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 1).Single()
			};

			//pictures
			productBooksMotorradAbenteuer.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000943_motorrad-abenteuer-fahrtechnik-fur-reise-enduros.jpeg"), "image/jpeg", GetSeName(productBooksMotorradAbenteuer.Name)),
				DisplayOrder = 1,
			});

			//attributes
			productBooksMotorradAbenteuer.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Edition -> bound
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 13).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productBooksMotorradAbenteuer.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Category -> cars
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 14).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 9).Single()
			});
			productBooksMotorradAbenteuer.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Language -> German
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 12).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});

			#endregion productBooksMotorradAbenteuer

			#endregion category books

			#region computer

			#region productComputerDellInspiron23

			var productComputerDellInspiron23 = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Dell Inspiron One 23",
				ShortDescription = "This 58 cm (23'')-All-in-One PC with Full HD, Windows 8 and powerful Intel ® Core ™ processor third generation allows practical interaction with a touch screen.",
				FullDescription = "<p>Ultra high performance all-in-one i7 PC with Windows 8, Intel ® Core ™ processor, huge 2TB hard drive and Blu-Ray drive. </p> <p> Intel® Core™ i7-3770S Processor ( 3,1 GHz, 6 MB Cache)<br> Windows 8 64bit , english<br> 8 GB1 DDR3 SDRAM at 1600 MHz<br> 2 TB-Serial ATA-Harddisk (7.200 rot/min)<br> 1GB AMD Radeon HD 7650<br> </p>",
                Sku = "P-1012",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Dell Inspiron One 23",
				Price = 589.00M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 0).Single()
			};

			#region pictures

			//pictures
			productComputerDellInspiron23.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000953_dell-inspiron-one-23.jpeg"), "image/jpeg", GetSeName(productComputerDellInspiron23.Name)),
				DisplayOrder = 1,
			});
			productComputerDellInspiron23.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000954_dell-inspiron-one-23.jpeg"), "image/jpeg", GetSeName(productComputerDellInspiron23.Name)),
				DisplayOrder = 2,
			});
			productComputerDellInspiron23.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000956_dell-inspiron-one-23.jpeg"), "image/jpeg", GetSeName(productComputerDellInspiron23.Name)),
				DisplayOrder = 3,
			});

			#endregion pictures

			#region manufacturer

			//manufacturer
			productComputerDellInspiron23.ProductManufacturers.Add(new ProductManufacturer()
			{
				Manufacturer = _ctx.Set<Manufacturer>().Where(c => c.Name == "Dell").Single(),
				DisplayOrder = 1,
			});

			#endregion manufacturer

			#region SpecificationAttributes
			//attributes
			productComputerDellInspiron23.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 1,
				// CPU -> Intel
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 1).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 2).Single()
			});
			productComputerDellInspiron23.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 2,
				// RAM -> 4 GB 
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 4).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productComputerDellInspiron23.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Harddisk-Typ / HDD
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 16).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productComputerDellInspiron23.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 4,
				// Harddisk-Capacity / 750 GB
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 3).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 3).Single()
			});
			productComputerDellInspiron23.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 5,
				// OS / Windows 7 32 Bit
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 5).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			#endregion SpecificationAttributes

			#endregion productComputerDellInspiron23

			#region productComputerDellOptiplex3010

			var productComputerDellOptiplex3010 = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Dell Optiplex 3010 DT Base",
				ShortDescription = "SPECIAL OFFER: Extra 50 € discount on all Dell OptiPlex desktops from a value of € 549. Online Coupon:? W8DWQ0ZRKTM1, valid until 04/12/2013.",
				FullDescription = "<p>Also included in this system include To change these selections, the</p> <p> 1 Year Basic Service - On-Site NBD - No Upgrade Selected<br> No asset tag required </p> <p> The following options are default selections included with your order. <br> German (QWERTY) Dell KB212-B Multimedia USB Keyboard Black<br> X11301001<br> WINDOWS LIVE <br> OptiPlex ™ order - Germany  <br> OptiPlex ™ Intel ® Core ™ i3 sticker <br> Optical software is not required, operating system software sufficiently   <br> </p>",
                Sku = "P-1013",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Dell Optiplex 3010 DT Base",
				Price = 419.00M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 0).Single()
			};

			#region pictures

			//pictures
			productComputerDellOptiplex3010.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000953_dell-inspiron-one-23.jpeg"), "image/jpeg", GetSeName(productComputerDellOptiplex3010.Name)),
				DisplayOrder = 1,
			});
			productComputerDellOptiplex3010.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000954_dell-inspiron-one-23.jpeg"), "image/jpeg", GetSeName(productComputerDellOptiplex3010.Name)),
				DisplayOrder = 2,
			});
			productComputerDellOptiplex3010.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000956_dell-inspiron-one-23.jpeg"), "image/jpeg", GetSeName(productComputerDellOptiplex3010.Name)),
				DisplayOrder = 3,
			});

			#endregion pictures

			#region manufacturer

			//manufacturer
			productComputerDellOptiplex3010.ProductManufacturers.Add(new ProductManufacturer()
			{
				Manufacturer = _ctx.Set<Manufacturer>().Where(c => c.Name == "Dell").Single(),
				DisplayOrder = 1,
			});

			#endregion manufacturer

			#region SpecificationAttributes
			//attributes
			productComputerDellOptiplex3010.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 1,
				// CPU -> Intel
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 1).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 2).Single()
			});
			productComputerDellOptiplex3010.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 2,
				// RAM -> 4 GB 
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 4).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 2).Single()
			});
			productComputerDellOptiplex3010.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 3,
				// Harddisk-Typ / HDD
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 16).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 2).Single()
			});
			productComputerDellOptiplex3010.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 4,
				// Harddisk-Capacity / 750 GB
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 3).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 2).Single()
			});
			productComputerDellOptiplex3010.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 5,
				// OS / Windows 7 32 Bit
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 5).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 4).Single()
			});
			#endregion SpecificationAttributes

			#endregion productComputerDellOptiplex3010

			#region productComputerAcerAspireOne
			var productComputerAcerAspireOne = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Acer Aspire One 8.9\" Mini-Notebook Case - (Black)",
				ShortDescription = "Acer Aspire One 8.9\" Mini-Notebook and 6 Cell Battery model (AOA150-1447)",
				FullDescription = "<p>Acer Aspire One 8.9&quot; Memory Foam Pouch is the perfect fit for Acer Aspire One 8.9&quot;. This pouch is made out of premium quality shock absorbing memory form and it provides extra protection even though case is very light and slim. This pouch is water resistant and has internal supporting bands for Acer Aspire One 8.9&quot;. Made In Korea.</p>",
                Sku = "P-1014",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Acer Aspire One 8.9",
				ShowOnHomePage = true,
				Price = 210.6M,
				IsShipEnabled = true,
				Weight = 2,
				Length = 2,
				Width = 2,
				Height = 3,
				ManageInventoryMethod = ManageInventoryMethod.ManageStock,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				DisplayStockAvailability = true,
				LowStockActivity = LowStockActivity.DisableBuyButton,
				BackorderMode = BackorderMode.NoBackorders,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 0).Single()
			};

			#region manufacturer

			//manufacturer
			productComputerAcerAspireOne.ProductManufacturers.Add(new ProductManufacturer()
			{
				Manufacturer = _ctx.Set<Manufacturer>().Where(c => c.Name == "Acer").Single(),
				DisplayOrder = 1,
			});

			#endregion manufacturer

			#region tierPrieces
			productComputerAcerAspireOne.TierPrices.Add(new TierPrice()
			{
				Quantity = 2,
				Price = 205
			});
			productComputerAcerAspireOne.TierPrices.Add(new TierPrice()
			{
				Quantity = 5,
				Price = 189
			});
			productComputerAcerAspireOne.TierPrices.Add(new TierPrice()
			{
				Quantity = 10,
				Price = 155
			});
			productComputerAcerAspireOne.HasTierPrices = true;
			#endregion tierPrieces

			#region pictures
			productComputerAcerAspireOne.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "acer-aspire-one.jpg"), "image/jpeg", GetSeName(productComputerAcerAspireOne.Name)),
				DisplayOrder = 1,
			});
			productComputerAcerAspireOne.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "01-12Hand_Aspire1.jpg"), "image/jpeg", GetSeName(productComputerAcerAspireOne.Name)),
				DisplayOrder = 2,
			});
			productComputerAcerAspireOne.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "58_00007561.jpg"), "image/jpeg", GetSeName(productComputerAcerAspireOne.Name)),
				DisplayOrder = 3,
			});

			#endregion tierPrieces

			#endregion productComputerAcerAspireOne

			#endregion computer

			#region Smartphones

			#region productSmartPhonesAppleIphone5

			var productSmartPhonesAppleIphone5 = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Apple iPhone 5 32 GB",
				ShortDescription = "The biggest thing to happen to iPhone since iPhone.",
				FullDescription = "<p> The iPhone 5 at a glance. New design. </p> <p> With 7.6 mm and 112 g3 the iPhone 5 has a remarkably thin and light design. It is made of anodized aluminum. The beveled edges are precision cut with a diamond. <br> Brilliant 4 \"Retina Display.<br> Now you can see everything more vivid and detailed. And although the screen is bigger, it has the same width as the iPhone 4S and is therefore just as easily operated with one hand. Powerful A6 chip. Compared with the A5 chip, he has up to twice the CPU and graphics performance. And despite its speed, the iPhone 5 has a fantastic battery life. Ultra-fast mobile data. The iPhone 5 supports the latest wireless technologies and can be even more so with the world verbinden.4Und networks and Wi-Fi is faster. </p> <p> Delivery 6 Apple iPhone 5 with iOS EarPods with Remote and Mic to USB Cable Lightning USB Power Adapter (Power Supply) Choose the iPhone that suits you. 16 GB, 32 GB or 64 GB capacity? The iPhone is available in three capacities: 16, 32 and 64 GB. \"GB\" stands for gigabytes. The more gigabytes your iPhone, the more space you have. For content such as apps, games, photos, HD videos, music, movies and more In a large music or photo library, or if you frequently invite HD movies to an iPhone recommends using a larger capacity. If your music or photo library is small or you do or buy rare films, ranging from an iPhone with a smaller memory size for you. With time comes along Some of content on your iPhone. Therefore, you should consider your growing storage needs of the iPhone purchase. The unlocked iPhone The unlocked iPhone is not dependent on any cellular network, which means that you can decide for any supported GSM network worldwide. Buy an iPhone without a contract at the Apple Online Store, then look for a tariff for the iPhone, which covers only the SIM card. Or contact your current provider if you want to keep your current rate. </p> <p> PrePaid<br> If you want a contract, you can choose one of the \"prepaid\" starter packs of available network operators in the Apple Online Store. With \"prepaid\" you get your iPhone and ready. Compatible with a SIM card A credit check is not required. You pay online just for what you use, and can switch the network provider at any time. \"Prepaid\" is a good option if you want to use when traveling abroad prefer a local supplier. Which SIM card do I need? It does not matter if you are a new contract, further Lead your existing contract or \"prepaid\" choose - you will need a compatible SIM card. For the iPhone 5, it takes a nano-SIM card for the iPhone 4S and the iPhone 4 is a micro-SIM card. For more details you get with your wireless carrier. Cellular networks and Wi-Fi </p> <p> A1428 GSM model: UMTS / HSPA + / DC-HSDPA (850, 900, 1900, 2100 MHz) GSM / EDGE (850, 900, 1800, 1900 MHz), LTE (Band 4 and 17) <br> Model A1429 * CDMA: CDMA EV-DO Rev. A and Rev. B (800, 1900, 2100 MHz), UMTS / HSPA + / DC-HSDPA (850, 900, 1900, 2100 MHz) GSM / EDGE (850, 900 , 1800, 1900 MHz), LTE band (1, 3, 5, 13, 25) <br> * A1429 GSM model: UMTS / HSPA + / DC-HSDPA (850, 900, 1900, 2100 MHz) GSM / EDGE (850, 900, 1800, 1900 MHz), LTE (Volume 1, 3, 5) <br> 802.11a/b/g/n Wi-Fi (802.11n 2.4 GHz and 5 GHz) <br> Bluetooth 4.0 <br> Display Retina Display 4 \"widescreen Multi-Touch display (10.16 cm diagonal) 1136 x 640 pixels at 326 ppi Typical contrast ratio: 500 cd/m2 simultaneously resistant oleophobic coating on the front support for display of multiple languages ​​and characters: 800:1 Maximum brightness typical Camera, photos and videos 8-megapixel iSight camera Panorama Video recording, HD (1080p) up to 30 frames per second with audio FaceTime HD camera with 1.2-megapixel still images and HD video (720p) for up to 30 frames per second Autofocus Tap to focus video photos and facial recognition in video and photos LED flash Improved video stabilization for geotagging photos and videos Audio Support for AirPlay Mirroring to Apple TV with 720p AirPlay video streaming to Apple TV (3rd generation) up to 1080p and Apple TV (2nd generation) up to 720p Video formats supported: H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 kbit / s, 48kHz, stereo audio in m4v, mp4 and mov... , MPEG-4 video, up to 2.5 Mbit / s, 640 x 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps m4v / s, 48 ​​kHz, stereo audio in. , mp4 and mov file formats Motion JPEG (M-JPEG)... up to 35 Mbit / s, 1280 x 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in avi format </p>",
                Sku = "P-1015",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Apple iPhone 5 32 GB",
				ShowOnHomePage = true,
				Price = 579.00M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 2).Single()
			};

			#region pictures

			//pictures
			productSmartPhonesAppleIphone5.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000789-apple-iphone-5-32-gb.jpg"), "image/jpeg", GetSeName(productSmartPhonesAppleIphone5.Name)),
				DisplayOrder = 1,
			});
			productSmartPhonesAppleIphone5.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000785-apple-iphone-5-32-gb.jpg"), "image/jpeg", GetSeName(productSmartPhonesAppleIphone5.Name)),
				DisplayOrder = 2,
			});
			productSmartPhonesAppleIphone5.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000786-apple-iphone-5-32-gb.jpg"), "image/jpeg", GetSeName(productSmartPhonesAppleIphone5.Name)),
				DisplayOrder = 3,
			});
			productSmartPhonesAppleIphone5.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000787-apple-iphone-5-32-gb.jpg"), "image/jpeg", GetSeName(productSmartPhonesAppleIphone5.Name)),
				DisplayOrder = 4,
			});
			productSmartPhonesAppleIphone5.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000788-apple-iphone-5-32-gb.jpg"), "image/jpeg", GetSeName(productSmartPhonesAppleIphone5.Name)),
				DisplayOrder = 5,
			});



			#endregion pictures

			#region manufacturer

			//manufacturer
			productSmartPhonesAppleIphone5.ProductManufacturers.Add(new ProductManufacturer()
			{
				Manufacturer = _ctx.Set<Manufacturer>().Where(c => c.Name == "Apple").Single(),
				DisplayOrder = 1,
			});

			#endregion manufacturer

			#region SpecificationAttributes
			//attributes
			productSmartPhonesAppleIphone5.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 1,
				// housing > alu
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 8).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 4).Single()
			});
			productSmartPhonesAppleIphone5.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 2,
				// manufacturer > apple
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 20).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productSmartPhonesAppleIphone5.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 5,
				// OS / Windows 7 32 Bit
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 5).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 9).Single()
			});
			#endregion SpecificationAttributes

			#endregion productSmartPhonesAppleIphone5

			#endregion Smartphones

			#region Instant Download Music

			#region Antonio Vivaldi: then spring

			var productInstantDownloadVivaldi = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Antonio Vivaldi: spring",
				ShortDescription = "MP3, 320 kbit/s",
				FullDescription = "<p>Antonio Vivaldi: Spring</p> <p>Antonio Lucio Vivaldi (March 4, 1678 in Venice, &dagger; 28 July 1741 in Vienna) was a Venetian composer and violinist in the Baroque.</p> <p>The Four Seasons (Le quattro stagioni Italian) is perhaps the most famous works of Antonio Vivaldi. It's four violin concertos with extra-musical programs, each portraying a concert season. This is the individual concerts one - probably written by Vivaldi himself - Sonnet preceded by consecutive letters in front of the lines and in the appropriate places in the score arrange the verbal description of the music.</p> <p>Vivaldi had previously always been experimenting with non-musical programs, which often reflected in his tracks, the exact interpretation of the individual points score is unusual for him. His experience as a virtuoso violinist allowed him access to particularly effective playing techniques, as an opera composer, he had developed a strong sense of effects, both of which benefitted from him.</p> <p>As the title suggests, especially to imitate natural phenomena - gentle winds, severe storms and thunderstorms are elements that are common to all four concerts. There are also various birds and even a dog, further human activities such as hunting, a barn dance, ice skating, including stumbling and falling to the heavy sleep of a drunkard.</p> <p>The work dates from 1725 and is available in two print editions, which appeared more or less simultaneously published in Amsterdam and Paris.</p>",
                Sku = "P-1016",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Antonio Vivaldi: spring",
				Price = 1.99M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsDownload = true,
				HasSampleDownload = true,
				SampleDownload = new Download()
				{
					DownloadGuid = Guid.NewGuid(),
					ContentType = "audio/mp3",
					DownloadBinary = File.ReadAllBytes(sampleDownloadsPath + "vivaldi-four-seasons-spring.mp3"),
					Extension = ".mp3",
					Filename = "vivaldi-four-seasons-spring",
					IsNew = true,
				}
			};

			#region pictures

			//pictures
			productInstantDownloadVivaldi.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0000740-antonio-vivaldi-der-fruhling-100.jpg"), "image/jpeg", GetSeName(productInstantDownloadVivaldi.Name)),
				DisplayOrder = 1,
			});

			#endregion pictures

			#region SpecificationAttributes
			//attributes
			productInstantDownloadVivaldi.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 1,
				// mp3 quality > 320 kbit/S
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 18).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 3).Single()
			});
			productInstantDownloadVivaldi.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 2,
				// genre > classic
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 19).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 6).Single()
			});

			#endregion SpecificationAttributes

			#endregion Antonio Vivildi: then spring

			#region Beethoven für Elise

			var productInstantDownloadBeethoven = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Ludwig van Beethoven: For Elise",
				ShortDescription = "Ludwig van Beethoven's most popular compositions",
				FullDescription = "<p> The score was not published until 1867, 40 years after the composer's death in 1827. The discoverer of the piece, Ludwig Nohl, affirmed that the original autographed manuscript, now lost, was dated 27 April 1810.[4] The version of \"Für Elise\" we hear today is an earlier version that was transcribed by Ludwig Nohl. There is a later version, with drastic changes to the accompaniment which was transcribed from a later manuscript by Barry Cooper. The most notable difference is in the first theme, the left-hand arpeggios are delayed by a 16th note beat. There are a few extra bars in the transitional section into the B section; and finally, the rising A minor arpeggio figure is moved later into the piece. The tempo marking Poco Moto is believed to have been on the manuscript that Ludwig Nohl transcribed (now lost). The later version includes the marking Molto Grazioso. It is believed that Beethoven intended to add the piece to a cycle of bagatelles.[citation needed] </p> <p> Therese Malfatti, widely believed to be the dedicatee of \"Für Elise\" The pianist and musicologist Luca Chiantore (es) argued in his thesis and his 2010 book Beethoven al piano that Beethoven might not have been the person who gave the piece the form that we know today. Chiantore suggested that the original signed manuscript, upon which Ludwig Nohl claimed to base his transcription, may never have existed.[5] On the other hand, the musicologist Barry Cooper stated, in a 1984 essay in The Musical Times, that one of two surviving sketches closely resembles the published version.[6] </p>",
                Sku = "P-1017",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Ludwig van Beethoven: Für Elise",
				ShowOnHomePage = true,
				Price = 1.89M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsDownload = true,
				HasSampleDownload = true,
				SampleDownload = new Download()
				{
					DownloadGuid = Guid.NewGuid(),
					ContentType = "audio/mp3",
					DownloadBinary = File.ReadAllBytes(sampleDownloadsPath + "beethoven-fur-elise.mp3"),
					Extension = ".mp3",
					Filename = "beethoven-fur-elise.mp3",
					IsNew = true
				}
			};

			#region pictures

			//pictures
			productInstantDownloadBeethoven.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "Beethoven.jpg"), "image/jpeg", GetSeName(productInstantDownloadBeethoven.Name)),
				DisplayOrder = 1,
			});

			#endregion pictures

			#region SpecificationAttributes
			//attributes
			productInstantDownloadBeethoven.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 1,
				// mp3 quality > 320 kbit/S
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 18).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 3).Single()
			});
			productInstantDownloadBeethoven.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 2,
				// genre > classic
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 19).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 6).Single()
			});

			#endregion SpecificationAttributes

			#endregion Beethoven für Elise
			#endregion Instant Download Music

			#region watches

			#region productWatchesCertinaDSPodiumBigSize

			var productWatchesCertinaDSPodiumBigSize = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Name = "Certina DS Podium Big Size ",
				ShortDescription = "C001.617.26.037.00",
				FullDescription = "<p> The iPhone 5 at a glance. New design. </p> <p> With 7.6 mm and 112 g3 the iPhone 5 has a remarkably thin and light design. It is made of anodized aluminum. The beveled edges are precision cut with a diamond. <br> Brilliant 4 \"Retina Display.<br> Now you can see everything more vivid and detailed. And although the screen is bigger, it has the same width as the iPhone 4S and is therefore just as easily operated with one hand. Powerful A6 chip. Compared with the A5 chip, he has up to twice the CPU and graphics performance. And despite its speed, the iPhone 5 has a fantastic battery life. Ultra-fast mobile data. The iPhone 5 supports the latest wireless technologies and can be even more so with the world verbinden.4Und networks and Wi-Fi is faster. </p> <p> Delivery 6 Apple iPhone 5 with iOS EarPods with Remote and Mic to USB Cable Lightning USB Power Adapter (Power Supply) Choose the iPhone that suits you. 16 GB, 32 GB or 64 GB capacity? The iPhone is available in three capacities: 16, 32 and 64 GB. \"GB\" stands for gigabytes. The more gigabytes your iPhone, the more space you have. For content such as apps, games, photos, HD videos, music, movies and more In a large music or photo library, or if you frequently invite HD movies to an iPhone recommends using a larger capacity. If your music or photo library is small or you do or buy rare films, ranging from an iPhone with a smaller memory size for you. With time comes along Some of content on your iPhone. Therefore, you should consider your growing storage needs of the iPhone purchase. The unlocked iPhone The unlocked iPhone is not dependent on any cellular network, which means that you can decide for any supported GSM network worldwide. Buy an iPhone without a contract at the Apple Online Store, then look for a tariff for the iPhone, which covers only the SIM card. Or contact your current provider if you want to keep your current rate. </p> <p> PrePaid<br> If you want a contract, you can choose one of the \"prepaid\" starter packs of available network operators in the Apple Online Store. With \"prepaid\" you get your iPhone and ready. Compatible with a SIM card A credit check is not required. You pay online just for what you use, and can switch the network provider at any time. \"Prepaid\" is a good option if you want to use when traveling abroad prefer a local supplier. Which SIM card do I need? It does not matter if you are a new contract, further Lead your existing contract or \"prepaid\" choose - you will need a compatible SIM card. For the iPhone 5, it takes a nano-SIM card for the iPhone 4S and the iPhone 4 is a micro-SIM card. For more details you get with your wireless carrier. Cellular networks and Wi-Fi </p> <p> A1428 GSM model: UMTS / HSPA + / DC-HSDPA (850, 900, 1900, 2100 MHz) GSM / EDGE (850, 900, 1800, 1900 MHz), LTE (Band 4 and 17) <br> Model A1429 * CDMA: CDMA EV-DO Rev. A and Rev. B (800, 1900, 2100 MHz), UMTS / HSPA + / DC-HSDPA (850, 900, 1900, 2100 MHz) GSM / EDGE (850, 900 , 1800, 1900 MHz), LTE band (1, 3, 5, 13, 25) <br> * A1429 GSM model: UMTS / HSPA + / DC-HSDPA (850, 900, 1900, 2100 MHz) GSM / EDGE (850, 900, 1800, 1900 MHz), LTE (Volume 1, 3, 5) <br> 802.11a/b/g/n Wi-Fi (802.11n 2.4 GHz and 5 GHz) <br> Bluetooth 4.0 <br> Display Retina Display 4 \"widescreen Multi-Touch display (10.16 cm diagonal) 1136 x 640 pixels at 326 ppi Typical contrast ratio: 500 cd/m2 simultaneously resistant oleophobic coating on the front support for display of multiple languages ​​and characters: 800:1 Maximum brightness typical Camera, photos and videos 8-megapixel iSight camera Panorama Video recording, HD (1080p) up to 30 frames per second with audio FaceTime HD camera with 1.2-megapixel still images and HD video (720p) for up to 30 frames per second Autofocus Tap to focus video photos and facial recognition in video and photos LED flash Improved video stabilization for geotagging photos and videos Audio Support for AirPlay Mirroring to Apple TV with 720p AirPlay video streaming to Apple TV (3rd generation) up to 1080p and Apple TV (2nd generation) up to 720p Video formats supported: H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 kbit / s, 48kHz, stereo audio in m4v, mp4 and mov... , MPEG-4 video, up to 2.5 Mbit / s, 640 x 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps m4v / s, 48 ​​kHz, stereo audio in. , mp4 and mov file formats Motion JPEG (M-JPEG)... up to 35 Mbit / s, 1280 x 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in avi format </p>",
                Sku = "P-1018",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Certina DS Podium Big Size",
				ShowOnHomePage = true,
				Price = 479.00M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = _ctx.Set<DeliveryTime>().Where(sa => sa.DisplayOrder == 2).Single()
			};

			#region pictures

			//pictures
			productWatchesCertinaDSPodiumBigSize.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "0001424-certina-ds-podium-big-size-herrenchronograph.jpg"), "image/jpeg", GetSeName(productWatchesCertinaDSPodiumBigSize.Name)),
				DisplayOrder = 1,
			});

			#endregion pictures

			#region manufacturer

			//manufacturer
			productWatchesCertinaDSPodiumBigSize.ProductManufacturers.Add(new ProductManufacturer()
			{
				Manufacturer = _ctx.Set<Manufacturer>().Where(c => c.Name == "Certina").Single(),
				DisplayOrder = 1,
			});

			#endregion manufacturer

			#region SpecificationAttributes
			//attributes
			productWatchesCertinaDSPodiumBigSize.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 1,
				// housing > steel
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 8).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productWatchesCertinaDSPodiumBigSize.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 2,
				// manufacturer > Certina
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 20).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 14).Single()
			});
			productWatchesCertinaDSPodiumBigSize.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 5,
				// Gender -> gentlemen
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 7).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 1).Single()
			});
			productWatchesCertinaDSPodiumBigSize.ProductSpecificationAttributes.Add(new ProductSpecificationAttribute()
			{
				AllowFiltering = true,
				ShowOnProductPage = true,
				DisplayOrder = 5,
				// movement -> quarz
				SpecificationAttributeOption = _ctx.Set<SpecificationAttribute>().Where(sa => sa.DisplayOrder == 9).Single().SpecificationAttributeOptions.Where(sao => sao.DisplayOrder == 3).Single()
			});
			#endregion SpecificationAttributes

			#endregion productWatchesCertinaDSPodiumBigSize

			#endregion watches

			#region gaming

			var manuSony = _ctx.Set<Manufacturer>().First(c => c.Name == "Sony");
			var manuUbisoft = _ctx.Set<Manufacturer>().First(c => c.Name == "Ubisoft");
			var categoryGaming = this._ctx.Set<Category>().First(c => c.Alias == "Gaming");
			var categoryGamingAccessories = this._ctx.Set<Category>().First(c => c.Alias == "Gaming Accessories");
			var categoryGamingGames = this._ctx.Set<Category>().First(c => c.Alias == "Games");

			#region bundlePs3AssassinCreed

			var productPs3 = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Sku = "Sony-PS399000",
				Name = "Playstation 3 Super Slim",
				ShortDescription = "The Sony PlayStation 3 is the multi media console for next-generation digital home entertainment. It offers the Blu-ray technology, which enables you to enjoy movies in high definition.",
				FullDescription = "<ul><li>PowerPC-base Core @3.2GHz</li><li>1 VMX vector unit per core</li><li>512KB L2 cache</li><li>7 x SPE @3.2GHz</li><li>7 x 128b 128 SIMD GPRs</li><li>7 x 256KB SRAM for SPE</li><li>* 1 of 8 SPEs reserved for redundancy total floating point performance: 218 GFLOPS</li><li> 1.8 TFLOPS floating point performance</li><li>Full HD (up to 1080p) x 2 channels</li><li>Multi-way programmable parallel floating point shader pipelines</li><li>GPU: RSX @550MHz</li><li>256MB XDR Main RAM @3.2GHz</li><li>256MB GDDR3 VRAM @700MHz</li><li>Sound: Dolby 5.1ch, DTS, LPCM, etc. (Cell-base processing)</li><li>Wi-Fi: IEEE 802.11 b/g</li><li>USB: Front x 4, Rear x 2 (USB2.0)</li><li>Memory Stick: standard/Duo, PRO x 1</li></ul>",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Playstation 3 Super Slim",
				Price = 189.00M,
				OldPrice = 199.99M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = firstDeliveryTime
			};

			productPs3.ProductManufacturers.Add(new ProductManufacturer() { Manufacturer = manuSony, DisplayOrder = 1 });
			productPs3.ProductCategories.Add(new ProductCategory() { Category = categoryGaming,	DisplayOrder = 4 });

			productPs3.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "sony-ps3-black.jpg"), "image/jpeg", GetSeName(productPs3.Name) + "-black"),
				DisplayOrder = 1
			});
			productPs3.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "sony-ps3-white.jpg"), "image/jpeg", GetSeName(productPs3.Name) + "-white"),
				DisplayOrder = 2
			});


			var productDualshock3Controller = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Sku = "Sony-PS399004",
				Name = "DUALSHOCK 3 Wireless Controller",
				ShortDescription = "Equipped with SIXAXIS™ motion sensing technology and pressure sensors in each action button, the DUALSHOCK®3 wireless controller for the PlayStation®3 provides the most intuitive game play experience.",
				FullDescription = "<ul><li><h4>Weights and Measurements</h4><ul><li>Dimensions (Approx.) : 5.56\"(w) x 8.5\"(h) x 3.63\" (d)</li></ul></li></ul>",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "DUALSHOCK 3 Wireless Controller",
				Price = 54.90M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = firstDeliveryTime
			};

			productDualshock3Controller.ProductManufacturers.Add(new ProductManufacturer() { Manufacturer = manuSony, DisplayOrder = 1 });
			productDualshock3Controller.ProductCategories.Add(new ProductCategory() { Category = categoryGamingAccessories, DisplayOrder = 1 });

			productDualshock3Controller.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "sony-Dualshock3WirelessCont.jpg"), "image/jpeg", GetSeName(productDualshock3Controller.Name)),
				DisplayOrder = 1
			});


			var productAssassinsCreed3 = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Sku = "Ubi-acreed3",
				Name = "Assassin's Creed III",
				ShortDescription = "Third-person action-adventure title set.",
				FullDescription = "Assassin's Creed III is set in an open world and presented from the third-person perspective with a primary focus on using Desmond and Connor's combat and stealth abilities to eliminate targets and explore the environment. Connor is able to freely explore 18th-century Boston, New York and the American frontier to complete side missions away from the primary storyline. The game also features a multiplayer component, allowing players to compete online to complete solo and team based objectives including assassinations and evading pursuers. Ubisoft developed a new game engine, Anvil Next, for the game.",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Assassin's Creed III",
				Price = 49.90M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = firstDeliveryTime
			};

			productAssassinsCreed3.ProductManufacturers.Add(new ProductManufacturer() {	Manufacturer = manuUbisoft,	DisplayOrder = 1 });
			productAssassinsCreed3.ProductCategories.Add(new ProductCategory() { Category = categoryGamingGames, DisplayOrder = 4 });

			productAssassinsCreed3.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "ubisoft-assassins-creed-3.jpg"), "image/jpeg", GetSeName("Assassin Creed 3")),
				DisplayOrder = 1
			});


			var productBundlePs3AssassinCreed = new Product()
			{
				ProductType = ProductType.BundledProduct,
				VisibleIndividually = true,
				Sku = "Sony-PS399105",
				Name = "PlayStation 3 Assassin's Creed III Bundle",
				ShortDescription = "500GB PlayStation®3 system, 2 × DUALSHOCK®3 wireless controller and Assassin's Creed® III.",
				FullDescription = 
					"<ul><li><h4>Processor</h4><ul><li>Processor Technology : Cell Broadband Engine™</li></ul></li><li><h4>General</h4><ul><li>Communication : Ethernet (10BASE-T, 100BASE-TX, 1000BASE-T IEEE 802.11 b/g Wi-Fi<br tabindex=\"0\">Bluetooth 2.0 (EDR)</li><li>Inputs and Outputs : USB 2.0 X 2</li></ul></li><li><h4>Graphics</h4><ul><li>Graphics Processor : RSX</li></ul></li><li><h4>Memory</h4><ul><li>Internal Memory : 256MB XDR Main RAM<br>256MB GDDR3 VRAM</li></ul></li><li><h4>Power</h4><ul><li>Power Consumption (in Operation) : Approximately 250 watts</li></ul></li><li><h4>Storage</h4><ul><li>Storage Capacity : 2.5' Serial ATA (500GB)</li></ul></li><li><h4>Video</h4><ul><li>Resolution : 480i, 480p, 720p, 1080i, 1080p (24p/60p)</li></ul></li><li><h4>Weights and Measurements</h4><ul><li>Dimensions (Approx.) : Approximately 11.42\" (W) x 2.56\" (H) x 11.42\" (D) (290mm x 65mm x 290mm)</li><li>Weight (Approx.) : Approximately 7.055 lbs (3.2 kg)</li></ul></li></ul>",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "PlayStation 3 Assassin's Creed III Bundle",
				Price = 269.97M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = firstDeliveryTime,
				ShowOnHomePage = true,
				BundleTitleText = "Bundle includes",
				BundlePerItemPricing = true,
				BundlePerItemShoppingCart = true
			};

			productBundlePs3AssassinCreed.ProductManufacturers.Add(new ProductManufacturer() { Manufacturer = manuSony, DisplayOrder = 1 });
			productBundlePs3AssassinCreed.ProductCategories.Add(new ProductCategory() { Category = categoryGaming, DisplayOrder = 1 });

			productBundlePs3AssassinCreed.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "sony-PS3AssassinsCreedBundle.jpg"), "image/jpeg", GetSeName(productBundlePs3AssassinCreed.Name)),
				DisplayOrder = 1
			});

			#endregion bundlePs3AssassinCreed

			#region bundlePs4

			var productPs4 = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Sku = "Sony-PS410034",
				Name = "PlayStation 4",
				ShortDescription = "The best place to play. Working with some of the most creative minds in the industry, PlayStation®4 delivers breathtaking and unique gaming experiences.",
				FullDescription = "<p><h4>The power to perform.</h4><div>PlayStation®4 was designed from the ground up to ensure that game creators can unleash their imaginations to develop the very best games and deliver new play experiences never before possible. With ultra-fast customized processors and 8GB of high-performance unified system memory, PS4™ is the home to games with rich, high-fidelity graphics and deeply immersive experiences that shatter expectations.</div></p><p><ul><li><h4>Processor</h4><ul><li>Processor Technology : Low power x86-64 AMD 'Jaguar', 8 cores</li></ul></li><li><h4>Software</h4><ul><li>Processor : Single-chip custom processor</li></ul></li><li><h4>Display</h4><ul><li>Display Technology : HDMI<br />Digital Output (optical)</li></ul></li><li><h4>General</h4><ul><li>Ethernet ports x speed : Ethernet (10BASE-T, 100BASE-TX, 1000BASE-T); IEEE 802.11 b/g/n; Bluetooth® 2.1 (EDR)</li><li>Hard disk : Built-in</li></ul></li><li><h4>General Specifications</h4><ul><li>Video : BD 6xCAV<br />DVD 8xCAV</li></ul></li><li><h4>Graphics</h4><ul><li>Graphics Processor : 1.84 TFLOPS, AMD Radeon™ Graphics Core Next engine</li></ul></li><li><h4>Interface</h4><ul><li>I/O Port : Super-Speed USB (USB 3.0), AUX</li></ul></li><li><h4>Memory</h4><ul><li>Internal Memory : GDDR5 8GB</li></ul></li></ul></p>",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "PlayStation 4",
				Price = 399.99M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 3,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = firstDeliveryTime
			};

			productPs4.ProductManufacturers.Add(new ProductManufacturer() { Manufacturer = manuSony, DisplayOrder = 1 });
			productPs4.ProductCategories.Add(new ProductCategory() { Category = categoryGaming, DisplayOrder = 5 });

			productPs4.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "sony-ps4.jpg"), "image/jpeg", GetSeName(productPs4.Name)),
				DisplayOrder = 1
			});


			var productDualshock4Controller = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Sku = "Sony-PS410037",
				Name = "DUALSHOCK 4 Wireless Controller",
				ShortDescription = "Combining classic controls with innovative new ways to play, the DUALSHOCK®4 wireless controller is an evolutionary controller for a new era of gaming.",
				FullDescription = "<p>Keys / Switches : PS button, SHARE button, OPTIONS button, Directional buttons (Up/Down/Left/Right), Action buttons (Triangle, Circle, Cross, Square), R1/L1/R2/L2/R3/L3, Right stick, Left stick, Touch Pad Button. The DualShock 4 is currently available in Jet Black, Magma Red, and Wave Blue.</p><p>The DualShock 4 features the following buttons: PS button, SHARE button, OPTIONS button, directional buttons, action buttons (triangle, circle, cross, square), shoulder buttons (R1/L1), triggers (R2/L2), analog stick click buttons (L3/R3) and a touch pad click button.[25] These mark several changes from the DualShock 3 and other previous PlayStation controllers. The START and SELECT buttons have been merged into a single OPTIONS button.[25][27] A dedicated SHARE button will allow players to upload video from their gameplay experiences.[25] The joysticks and triggers have been redesigned based on developer input.[25] with the ridged surface of the joysticks now featuring an outer ring surrounding the concave dome caps.</p><p>The DualShock 4 is backward compatible with the PlayStation 3, but only via a microUSB cable. Backward compatibility is not supported via Bluetooth.</p>",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "DUALSHOCK 4 Wireless Controller",
				Price = 59.99M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = firstDeliveryTime
			};

			productDualshock4Controller.ProductManufacturers.Add(new ProductManufacturer() { Manufacturer = manuSony, DisplayOrder = 1 });
			productDualshock4Controller.ProductCategories.Add(new ProductCategory() { Category = categoryGamingAccessories, DisplayOrder = 2 });

			productDualshock4Controller.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "sony-Dualshock4WirelessCont.jpg"), "image/jpeg", GetSeName(productDualshock4Controller.Name)),
				DisplayOrder = 1
			});


			var productPs4Camera = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Sku = "Sony-PS410040",
				Name = "PlayStation 4 Camera",
				ShortDescription = "Play, challenge and share your epic gaming moments with PlayStation®Camera and your PS4™. Multiplayer is enhanced through immediate, crystal clear audio and picture-in-picture video sharing.",
				FullDescription = "<ul><li>When combined with the DualShock 4 Wireless Controller's light bar, the evolutionary 3D depth-sensing technology in the PlayStation Camera allows it to precisely track a player's position in the room.</li><li>From navigational voice commands to facial recognition, the PlayStation Camera adds incredible innovation to your gaming.</li><li>Automatically integrate a picture-in-picture video of yourself during gameplay broadcasts, and challenge your friends during play.</li><li>Never leave a friend hanging or miss a chance to taunt your opponents with voice chat that keeps the conversation going, whether it's between rounds, between games, or just while kicking back.</li></ul>",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "PlayStation 4 Camera",
				Price = 59.99M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = firstDeliveryTime
			};

			productPs4Camera.ProductManufacturers.Add(new ProductManufacturer() { Manufacturer = manuSony, DisplayOrder = 1 });
			productPs4Camera.ProductCategories.Add(new ProductCategory() { Category = categoryGamingAccessories, DisplayOrder = 3 });

			productPs4Camera.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "sony-ps4-camera.jpg"), "image/jpeg", GetSeName(productPs4Camera.Name)),
				DisplayOrder = 1
			});


			var productBundlePs4 = new Product()
			{
				ProductType = ProductType.BundledProduct,
				VisibleIndividually = true,
				Sku = "Sony-PS410099",
				Name = "PlayStation 4 Bundle",
				ShortDescription = "PlayStation®4 system, DUALSHOCK®4 wireless controller and PS4 camera.",
				FullDescription =
					"<p><h4>The best place to play</h4><div>PlayStation 4 is the best place to play with dynamic, connected gaming, powerful graphics and speed, intelligent personalization, deeply integrated social capabilities, and innovative second-screen features. Combining unparalleled content, immersive gaming experiences, all of your favorite digital entertainment apps, and PlayStation exclusives, PS4 centers on gamers, enabling them to play when, where and how they want. PS4 enables the greatest game developers in the world to unlock their creativity and push the boundaries of play through a system that is tuned specifically to their needs.</div></p><p><h4>Gamer focused, developer inspired</h4><div>The PS4 system focuses on the gamer, ensuring that the very best games and the most immersive experiences are possible on the platform. The PS4 system enables the greatest game developers in the world to unlock their creativity and push the boundaries of play through a system that is tuned specifically to their needs. The PS4 system is centered around a powerful custom chip that contains eight x86-64 cores and a state of the art 1.84 TFLOPS graphics processor with 8 GB of ultra-fast GDDR5 unified system memory, easing game creation and increasing the richness of content achievable on the platform. The end result is new games with rich, high-fidelity graphics and deeply immersive experiences.</div></p><p><h4>Personalized, curated content</h4><div>The PS4 system has the ability to learn about your preferences. It will learn your likes and dislikes, allowing you to discover content pre-loaded and ready to go on your console in your favorite game genres or by your favorite creators. Players also can look over game-related information shared by friends, view friends’ gameplay with ease, or obtain information about recommended content, including games, TV shows and movies.</div></p><p><h4>New DUALSHOCK controller</h4><div>DUALSHOCK 4 features new innovations to deliver more immersive gaming experiences, including a highly sensitive six-axis sensor as well as a touch pad located on the top of the controller, which offers gamers completely new ways to play and interact with games.</div></p><p><h4>Shared game experiences</h4><div>Engage in endless personal challenges with your community and share your epic triumphs with the press of a button. Simply hit the SHARE button on the controller, scan through the last few minutes of gameplay, tag it and return to the game—the video uploads as you play. The PS4 system also enhances social spectating by enabling you to broadcast your gameplay in real-time.</div></p><p><h4>Remote play</h4><div>Remote Play on the PS4 system fully unlocks the PlayStation Vita system’s potential, making it the ultimate companion device. With the PS Vita system, gamers will be able to seamlessly play a range of PS4 titles on the beautiful 5-inch display over Wi-Fi access points in a local area network.</div></p><p><h4>PlayStation app</h4><div>The PlayStation App will enable iPhone, iPad, and Android-based smartphones and tablets to become second screens for the PS4 system. Once installed on these devices, players can view in-game items, purchase PS4 games and download them directly to the console at home, or remotely watch the gameplay of other gamers playing on their devices.</div></p><p><h4>PlayStation Plus</h4><div>Built to bring games and gamers together and fuel the next generation of gaming, PlayStation Plus helps you discover a world of exceptional gaming experiences. PlayStation Plus is a membership service that takes your gaming experience to the next level. Each month members receive an Instant Game Collection of top rated blockbuster and innovative Indie games, which they can download direct to their console.</div></p>",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "PlayStation 4 Bundle",
				Price = 429.99M,
				OldPrice = 449.99M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = firstDeliveryTime,
				BundleTitleText = "Bundle includes"
			};

			productBundlePs4.ProductManufacturers.Add(new ProductManufacturer() { Manufacturer = manuSony, DisplayOrder = 1 });
			productBundlePs4.ProductCategories.Add(new ProductCategory() { Category = categoryGaming, DisplayOrder = 2 });

			productBundlePs4.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "sony-ps4-bundle.jpg"), "image/jpeg", GetSeName(productBundlePs4.Name)),
				DisplayOrder = 1
			});

			#endregion bundlePs4

			#region groupAccessories

			var productGroupAccessories = new Product()
			{
				ProductType = ProductType.GroupedProduct,
				VisibleIndividually = true,
				Sku = "Sony-GroupAccessories",
				Name = "Accessories for unlimited gaming experience",
				ShortDescription = "The future of gaming is now with dynamic, connected gaming, powerful graphics and speed, intelligent personalization, deeply integrated social capabilities, and innovative second-screen features. The brilliant culmination of the most creative minds in the industry, PlayStation®4 delivers a unique gaming environment that will take your breath away.",
				FullDescription = "<ul><li>Immerse yourself in a new world of gameplay with powerful graphics and speed.</li><li>Eliminate lengthy load times of saved games with Suspend mode.</li><li>Immediately play digital titles without waiting for them to finish downloading thanks to background downloading and updating capability.</li><li>Instantly share images and videos of your favorite gameplay moments on Facebook with the SHARE button on the DUALSHOCK®4 controller.</li><li>Broadcast while you play in real-time through Ustream.</li></ul>",
				ProductTemplateId = productTemplateGrouped.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Accessories for unlimited gaming experience",
				Price = 0.0M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 3,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				ShowOnHomePage = true
			};

			productGroupAccessories.ProductManufacturers.Add(new ProductManufacturer() { Manufacturer = manuSony, DisplayOrder = 1 });
			productGroupAccessories.ProductCategories.Add(new ProductCategory() { Category = categoryGaming, DisplayOrder = 3 });

			productGroupAccessories.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "category_gaming_accessories.jpg"), "image/jpeg", GetSeName(productGroupAccessories.Name)),
				DisplayOrder = 1
			});

			#endregion groupAccessories

			#region Ps3PlusOneGame

			var productWatchDogs = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Sku = "Ubi-watchdogs",
				Name = "Watch Dogs",
				ShortDescription = "Hack and control the city – Use the city systems as weapons: traffic lights, security cameras, movable bridges, gas pipes, electricity grid and more.",
				FullDescription = "<p>In today's hyper-connected world, Chicago has the country’s most advanced computer system – one which controls almost every piece of city technology and holds key information on all of the city's residents.</p><p>You play as Aiden Pearce, a brilliant hacker but also a former thug, whose criminal past lead to a violent family tragedy. Now on the hunt for those who hurt your family, you'll be able to monitor and hack all who surround you while manipulating the city's systems to stop traffic lights, download personal information, turn off the electrical grid and more.</p><p>Use the city of Chicago as your ultimate weapon and exact your own style of revenge.</p><p>Monitor the masses – Everyone leaves a digital shadow - access all data on anyone and use it to your advantage.</p><p>State of the art graphics</p>",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Watch Dogs",
				Price = 49.90M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = firstDeliveryTime
			};

			productWatchDogs.ProductManufacturers.Add(new ProductManufacturer() { Manufacturer = manuUbisoft, DisplayOrder = 1 });
			productWatchDogs.ProductCategories.Add(new ProductCategory() { Category = categoryGamingGames, DisplayOrder = 1 });

			productWatchDogs.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "ubisoft-watchdogs.jpg"), "image/jpeg", GetSeName(productWatchDogs.Name)),
				DisplayOrder = 1
			});


			var productPrinceOfPersia = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Sku = "Ubi-princepersia",
				Name = "Prince of Persia \"The Forgotten Sands\"",
				ShortDescription = "Play the epic story of the heroic Prince as he fights and outwits his enemies in order to save his kingdom.",
				FullDescription = "<p>This game marks the return to the Prince of Persia® Sands of Time storyline. Prince of Persia: The Forgotten Sands™ will feature many of the fan-favorite elements from the original series as well as new gameplay innovations that gamers have come to expect from Prince of Persia.</p><p>Experience the story, setting, and gameplay in this return to the Sands of Time universe as we follow the original Prince of Persia through a new untold chapter.</p><p>Created by Ubisoft Montreal, the team that brought you various Prince of Persia® and Assassin’s Creed® games, Prince of Persia The Forgotten Sands™ has been over 2 years in the making.</p>",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Prince of Persia",
				Price = 39.90M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = firstDeliveryTime
			};

			productPrinceOfPersia.ProductManufacturers.Add(new ProductManufacturer() { Manufacturer = manuUbisoft, DisplayOrder = 1 });
			productPrinceOfPersia.ProductCategories.Add(new ProductCategory() { Category = categoryGamingGames, DisplayOrder = 2 });

			productPrinceOfPersia.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "ubisoft-prince-of-persia.jpg"), "image/jpeg", GetSeName(productPrinceOfPersia.Name)),
				DisplayOrder = 1
			});

			var productDriverSanFrancisco = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Sku = "Ubi-driversanfrancisco",
				Name = "Driver San Francisco",
				ShortDescription = "Developed by Ubisoft Reflections, creators of the original DRIVER title, DRIVER SAN FRANCISCO is the return of the established action driving video game series that has sold 14 million copies worldwide. Players will race through the iconic streets of San Francisco and beyond in the largest open-world environment to date spanning over 200 square miles.",
				FullDescription = "<p>With crime lord Charles Jericho now on the loose, San Francisco faces a terrible threat. Only one man can stand against him. He has driven the streets of a hundred cities and spent his whole life putting criminals behind bars. But to take Jericho down, there can be no turning back, and he knows that this may very well be his last ride. His name is John Tanner. He is the DRIVER.</p><p>An innovative gameplay feature enables players to seamlessly SHIFT between over 130 licensed muscle and super cars to keep them constantly in the heart of the action. With its timeless atmosphere, unique car handling and renewed playability, DRIVER SAN FRANCISCO revitalizes the classic free-roaming, cinematic car chase experience for the current generation of video game platforms.</p><p><h4>THE TRUE CAR CHASE EXPERIENCE</h4>Rediscover the cinematic driving sensations of DRIVER: loose suspension, long drifts, Hollywood-style crashes and high-speed pursuits in dense traffic. Drive over 130 fully destructible muscle and super cars with realistic handling and customization features that take fast-action driving to the next level.</p><p><h4>RELENTLESS MANHUNT</h4>Uncover a thrilling character-driven storyline in which personal revenge fuels Tanner’s relentless manhunt for Jericho. Follow Tanner's survival race across San Francisco and beyond to discover how this chase will bring him to a point of no return.</p><p><h4>SHIFT</h4>As Tanner recovers from a terrible crash, he realizes he has acquired a new ability, SHIFT, enabling him to instantly change vehicles and take control. Experience unprecedented intensity, diversity and freedom; SHIFT into a faster car, deploy civilian vehicles to destroy your enemies and even take control of your opponents’ car to force their demise. SHIFT also allows for thrilling new Multi-player modes within the game.</p><p><h4>A CAR CHASE PLAYGROUND</h4>Drive on more than 200 square miles of road network, over the Golden Gate Bridge, and through iconic locations of San Francisco. SHIFT from one car to the next and dip into the lives of different residents, a head-spinning array of characters, each with a unique perspective on a city under siege.</p><p><h4>MULTIPLAYER MAYHEM</h4>Experience 10 different addictive multi-player modes, including 6 on-line modes where the SHIFT feature allows players to be anywhere at any time. Ram, tail and overtake your friends in offline split-screen or online modes.</p><p><h4>…AND MORE</h4>Record your best stunts and chases with the Director replay mode to edit and share your movies. Test your driving skills with 20 challenging races and 80 “dares” spread all across the city. Listen to over 60 music tracks with songs from famous artists, not to mention the original memorable DRIVER theme.</p>",
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "Driver San Francisco",
				Price = 39.90M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 10000,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = firstDeliveryTime
			};

			productDriverSanFrancisco.ProductManufacturers.Add(new ProductManufacturer() { Manufacturer = manuUbisoft, DisplayOrder = 1 });
			productDriverSanFrancisco.ProductCategories.Add(new ProductCategory() { Category = categoryGamingGames, DisplayOrder = 3 });

			productDriverSanFrancisco.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "ubisoft-driver-san-francisco.jpg"), "image/jpeg", GetSeName(productDriverSanFrancisco.Name)),
				DisplayOrder = 1
			});

			var productPs3OneGame = new Product()
			{
				ProductType = ProductType.SimpleProduct,
				VisibleIndividually = true,
				Sku = "Sony-PS310111",
				Name = "PlayStation 3 plus game cheaper",
				ShortDescription = "Our special offer: PlayStation 3 plus one game of your choise cheaper.",
				FullDescription = productPs3.FullDescription,
				ProductTemplateId = productTemplateSimple.Id,
				AllowCustomerReviews = true,
				Published = true,
				CreatedOnUtc = DateTime.UtcNow,
				UpdatedOnUtc = DateTime.UtcNow,
				MetaTitle = "PlayStation 3 plus game cheaper",
				Price = 160.00M,
				ManageInventoryMethod = ManageInventoryMethod.DontManageStock,
				OrderMinimumQuantity = 1,
				OrderMaximumQuantity = 3,
				StockQuantity = 10000,
				NotifyAdminForQuantityBelow = 1,
				AllowBackInStockSubscriptions = false,
				IsShipEnabled = true,
				DeliveryTime = firstDeliveryTime
			};

			productPs3OneGame.ProductManufacturers.Add(new ProductManufacturer() { Manufacturer = manuSony, DisplayOrder = 1 });
			productPs3OneGame.ProductCategories.Add(new ProductCategory() { Category = categoryGaming, DisplayOrder = 6 });

			productPs3OneGame.ProductPictures.Add(new ProductPicture()
			{
				Picture = CreatePicture(File.ReadAllBytes(sampleImagesPath + "sony-ps3-plus-game.jpg"), "image/jpeg", GetSeName(productPs3OneGame.Name)),
				DisplayOrder = 1
			});

			#endregion Ps3PlusOneGame

			#endregion gaming


			var entities = new List<Product>
			{
				product5GiftCard, product25GiftCard, product50GiftCard, productBooksUberMan, productBooksGefangeneDesHimmels,
				productBooksBestGrillingRecipes, productBooksCookingForTwo, productBooksAutosDerSuperlative,  productBooksBildatlasMotorraeder, productBooksAutoBuch, productBooksFastCars,
				productBooksMotorradAbenteuer,  productComputerDellInspiron23, productComputerDellOptiplex3010,productSmartPhonesAppleIphone5, 
				productInstantDownloadVivaldi, productComputerAcerAspireOne, productInstantDownloadBeethoven, productWatchesCertinaDSPodiumBigSize,
				productPs3, productDualshock3Controller, productAssassinsCreed3, productBundlePs3AssassinCreed,
				productPs4, productDualshock4Controller, productPs4Camera, productBundlePs4,
				productGroupAccessories,
				productWatchDogs, productPrinceOfPersia, productDriverSanFrancisco, productPs3OneGame
			};

			this.Alter(entities);
			return entities;
		}
        /// <summary>
        /// Finds a product variant attribute combination by attributes stored in XML 
        /// </summary>
		/// <param name="product">Product</param>
        /// <param name="attributesXml">Attributes in XML format</param>
        /// <returns>Found product variant attribute combination</returns>
		public virtual ProductVariantAttributeCombination FindProductVariantAttributeCombination(Product product, string attributesXml)
        {
			if (product == null)
				throw new ArgumentNullException("product");

            return FindProductVariantAttributeCombination(product.Id, attributesXml);
        }