Пример #1
0
		public void Init()
		{
			serviceClient = new ProductService7Client();

			// create test Products that can be used with the create and update methods
			Product_in.Alias            = alias;
            TLocalizedValue name_de = new TLocalizedValue();
            name_de.LanguageCode = "de";
            name_de.Value = "Test-Hauptprodukt";
            TLocalizedValue name_en = new TLocalizedValue();
            name_en.LanguageCode = "en";
            name_en.Value = "test master product";
            Product_in.Name = new TLocalizedValue[] { name_de, name_en };

            TLocalizedValue longdesc_de = new TLocalizedValue();
                longdesc_de.LanguageCode = "de";
                longdesc_de.Value = "Test-Hauptprodukt lange Beschreibung";
            TLocalizedValue longdesc_en = new TLocalizedValue();
                longdesc_en.LanguageCode = "en";
                longdesc_en.Value = "test master product long description";
            Product_in.Text = new TLocalizedValue[] { longdesc_de, longdesc_en };

            TLocalizedValue title_de = new TLocalizedValue();
                title_de.LanguageCode = "de";
                title_de.Value = "Seitentitel";
            TLocalizedValue title_en = new TLocalizedValue();
                title_en.LanguageCode = "en";
                title_en.Value = "page title";
            Product_in.Title = new TLocalizedValue[] { title_de, title_en };

            Product_in.Class = "/Shops/DemoShop/ProductTypes/Shoe";
            Product_in.TaxClass         = "/TaxMatrixGermany/normal";
            Product_in.IsVisible        = true;         Product_in.IsVisibleSpecified       = true;
            Product_in.IsNew            = true;         Product_in.IsNewSpecified           = true;
			Product_in.PriceQuantity    = (float)1;     Product_in.PriceQuantitySpecified   = true;
            Product_in.MinOrder         = (float)1;     Product_in.MinOrderSpecified        = true;
			Product_in.IntervalOrder    = (float)1;     Product_in.IntervalOrderSpecified   = true;
            Product_in.OrderUnit        = "/Units/piece";

            Product_in.Weight           = (float)240;   Product_in.WeightSpecified          = true;
            Product_in.WeightUnit       = "/Units/gram";

            Product_in.RefAmount        = (float)1;     Product_in.RefAmountSpecified       = true;
            Product_in.RefContentAmount = (float)0.240; Product_in.RefContentAmountSpecified = true;
            Product_in.RefUnit          = "Units/gram/kilogram";

            Product_in.StockLevel       = (float)140;   Product_in.StockLevelSpecified      = true;
            Product_in.StockLevelAlert  = (float)100;   Product_in.StockLevelAlertSpecified = true;

            Product_in.DeliveryPeriod = "asap";

            Product_in.AvailabilityDate = new DateTime(2005, 12, 24, 10, 0, 0);

			TProductPrice price         = new TProductPrice();
			    price.Price             = (float)123;
			    price.CurrencyID        = "EUR";
			    price.TaxModel          = "gross";
			Product_in.ProductPrices    = new TProductPrice[]{ price };

            TProductPrice manufacturer_price = new TProductPrice();
                manufacturer_price.Price = (float)150;
                manufacturer_price.CurrencyID = "EUR";
                manufacturer_price.TaxModel = "gross";
            Product_in.ManufacturerPrices = new TProductPrice[] { manufacturer_price };

            TProductPrice deposit_price = new TProductPrice();
                deposit_price.Price = (float)5;
                deposit_price.CurrencyID = "EUR";
                deposit_price.TaxModel = "gross";
            Product_in.DepositPrices = new TProductPrice[] { deposit_price };

            TProductPrice prepay_price = new TProductPrice();
                prepay_price.Price = (float)10;
                prepay_price.CurrencyID = "EUR";
                prepay_price.TaxModel = "gross";
            Product_in.PrepaymentPrices = new TProductPrice[] { prepay_price };

            TProductPrice eco_price = new TProductPrice();
                eco_price.Price = (float)7;
                eco_price.CurrencyID = "EUR";
                eco_price.TaxModel = "gross";
            Product_in.EcoParticipationPrices = new TProductPrice[] { eco_price };

            Product_update.Path = path + alias;
			TLocalizedValue name_de_update  = new TLocalizedValue();
			    name_de_update.LanguageCode = "de";
			    name_de_update.Value        = "verändertes Test-Hauptprodukt";
			TLocalizedValue name_en_update  = new TLocalizedValue();
			    name_en_update.LanguageCode = "en";
			    name_en_update.Value        = "updated test master product";
			Product_update.Name             = new TLocalizedValue[]{name_de_update, name_en_update};

            TLocalizedValue longdesc_de_update = new TLocalizedValue();
                longdesc_de_update.LanguageCode = "de";
                longdesc_de_update.Value = "Test-Hauptprodukt lange Beschreibung modifiziert";
            TLocalizedValue longdesc_en_update = new TLocalizedValue();
                longdesc_en_update.LanguageCode = "en";
                longdesc_en_update.Value = "test master product long description updated";
            Product_update.Text = new TLocalizedValue[] { longdesc_de_update, longdesc_en_update };

            TLocalizedValue title_de_update = new TLocalizedValue();
                title_de_update.LanguageCode = "de";
                title_de_update.Value = "Seitentitel modifiziert";
            TLocalizedValue title_en_update = new TLocalizedValue();
                title_en_update.LanguageCode = "en";
                title_en_update.Value = "page title modified";
            Product_update.Title = new TLocalizedValue[] { title_de_update, title_en_update };

            Product_update.IsVisible = true; Product_update.IsVisibleSpecified = true;
            Product_update.IsNew            = true;         Product_update.IsNewSpecified               = true;
            Product_update.PriceQuantity    = (float)1;     Product_update.PriceQuantitySpecified       = true;
            Product_update.MinOrder         = (float)1;     Product_update.MinOrderSpecified            = true;
            Product_update.IntervalOrder    = (float)1;     Product_update.IntervalOrderSpecified       = true;

            Product_update.Weight           = (float)240;   Product_update.WeightSpecified              = true;
            Product_update.RefAmount        = (float)1;     Product_update.RefAmountSpecified           = true;
            Product_update.RefContentAmount = (float)0.240; Product_update.RefContentAmountSpecified    = true;

            Product_update.StockLevel       = (float)140;   Product_update.StockLevelSpecified          = true;
            Product_update.StockLevelAlert  = (float)100;   Product_update.StockLevelAlertSpecified     = true;

            Product_update.DeliveryPeriod = "as soon as possible";

            TProductPrice price_update = new TProductPrice();
			    price_update.Price          = (float)123.50;
			    price_update.CurrencyID     = "EUR";
			    price_update.TaxModel       = "gross";
			Product_update.ProductPrices    = new TProductPrice[]{price_update};

            TProductPrice manufacturer_price_update = new TProductPrice();
                manufacturer_price_update.Price = (float)150.50;
                manufacturer_price_update.CurrencyID = "EUR";
                manufacturer_price_update.TaxModel = "gross";
            Product_update.ManufacturerPrices = new TProductPrice[] { manufacturer_price_update };

            TProductPrice deposit_price_update = new TProductPrice();
                deposit_price_update.Price = (float)5.50;
                deposit_price_update.CurrencyID = "EUR";
                deposit_price_update.TaxModel = "gross";
            Product_update.DepositPrices = new TProductPrice[] { deposit_price_update };

            TProductPrice prepay_price_update = new TProductPrice();
                prepay_price_update.Price = (float)10.50;
                prepay_price_update.CurrencyID = "EUR";
                prepay_price_update.TaxModel = "gross";
            Product_update.PrepaymentPrices = new TProductPrice[] { prepay_price_update };

            TProductPrice eco_price_update = new TProductPrice();
                eco_price_update.Price = (float)7.50;
                eco_price_update.CurrencyID = "EUR";
                eco_price_update.TaxModel = "gross";
            Product_update.EcoParticipationPrices = new TProductPrice[] { eco_price_update };



            // create test Products that can be used as download product
            Product_down.Alias = alias;
            TLocalizedValue name_de_down = new TLocalizedValue();
            name_de_down.LanguageCode = "de";
            name_de_down.Value = "Test-Downloadprodukt";
            TLocalizedValue name_en_down = new TLocalizedValue();
            name_en_down.LanguageCode = "en";
            name_en_down.Value = "test master product";
            Product_down.Name = new TLocalizedValue[] { name_de, name_en };

            Product_down.Class = "/Shops/DemoShop/ProductTypes/Shoe";
            Product_down.TaxClass = "/TaxMatrixGermany/normal";
            Product_down.IsAvailable = true; Product_in.IsAvailableSpecified = true;
            Product_down.IsDownloadProduct = true;
            Product_down.MaxDownloadTime = "5";
            Product_down.MaxDownloadCount = "3";

            TDownload download = new TDownload();
            download.IsExternal = true;
            download.FileName = "http://www.epages.com/de/download/de-epages6-SEO.pdf";
            download.Position = "10";
            Product_down.DownloadProductMaps = new TDownload[] { download };

		}
Пример #2
0
        public void Init()
        {
            serviceClient = new ProductService7Client();

            // create test Products that can be used with the create and update methods
            Product_in.Alias = alias;
            TLocalizedValue name_de = new TLocalizedValue();

            name_de.LanguageCode = "de";
            name_de.Value        = "Test-Hauptprodukt";
            TLocalizedValue name_en = new TLocalizedValue();

            name_en.LanguageCode = "en";
            name_en.Value        = "test master product";
            Product_in.Name      = new TLocalizedValue[] { name_de, name_en };

            TLocalizedValue longdesc_de = new TLocalizedValue();

            longdesc_de.LanguageCode = "de";
            longdesc_de.Value        = "Test-Hauptprodukt lange Beschreibung";
            TLocalizedValue longdesc_en = new TLocalizedValue();

            longdesc_en.LanguageCode = "en";
            longdesc_en.Value        = "test master product long description";
            Product_in.Text          = new TLocalizedValue[] { longdesc_de, longdesc_en };

            TLocalizedValue title_de = new TLocalizedValue();

            title_de.LanguageCode = "de";
            title_de.Value        = "Seitentitel";
            TLocalizedValue title_en = new TLocalizedValue();

            title_en.LanguageCode = "en";
            title_en.Value        = "page title";
            Product_in.Title      = new TLocalizedValue[] { title_de, title_en };

            Product_in.Class         = "/Shops/DemoShop/ProductTypes/Shoe";
            Product_in.TaxClass      = "/TaxMatrixGermany/normal";
            Product_in.IsVisible     = true;         Product_in.IsVisibleSpecified = true;
            Product_in.IsNew         = true;         Product_in.IsNewSpecified = true;
            Product_in.PriceQuantity = (float)1;     Product_in.PriceQuantitySpecified = true;
            Product_in.MinOrder      = (float)1;     Product_in.MinOrderSpecified = true;
            Product_in.IntervalOrder = (float)1;     Product_in.IntervalOrderSpecified = true;
            Product_in.OrderUnit     = "/Units/piece";

            Product_in.Weight     = (float)240;   Product_in.WeightSpecified = true;
            Product_in.WeightUnit = "/Units/gram";

            Product_in.RefAmount        = (float)1;     Product_in.RefAmountSpecified = true;
            Product_in.RefContentAmount = (float)0.240; Product_in.RefContentAmountSpecified = true;
            Product_in.RefUnit          = "Units/gram/kilogram";

            Product_in.StockLevel      = (float)140;   Product_in.StockLevelSpecified = true;
            Product_in.StockLevelAlert = (float)100;   Product_in.StockLevelAlertSpecified = true;

            Product_in.DeliveryPeriod = "asap";

            Product_in.AvailabilityDate = new DateTime(2005, 12, 24, 10, 0, 0);

            TProductPrice price = new TProductPrice();

            price.Price              = (float)123;
            price.CurrencyID         = "EUR";
            price.TaxModel           = "gross";
            Product_in.ProductPrices = new TProductPrice[] { price };

            TProductPrice manufacturer_price = new TProductPrice();

            manufacturer_price.Price      = (float)150;
            manufacturer_price.CurrencyID = "EUR";
            manufacturer_price.TaxModel   = "gross";
            Product_in.ManufacturerPrices = new TProductPrice[] { manufacturer_price };

            TProductPrice deposit_price = new TProductPrice();

            deposit_price.Price      = (float)5;
            deposit_price.CurrencyID = "EUR";
            deposit_price.TaxModel   = "gross";
            Product_in.DepositPrices = new TProductPrice[] { deposit_price };

            TProductPrice prepay_price = new TProductPrice();

            prepay_price.Price          = (float)10;
            prepay_price.CurrencyID     = "EUR";
            prepay_price.TaxModel       = "gross";
            Product_in.PrepaymentPrices = new TProductPrice[] { prepay_price };

            TProductPrice eco_price = new TProductPrice();

            eco_price.Price      = (float)7;
            eco_price.CurrencyID = "EUR";
            eco_price.TaxModel   = "gross";
            Product_in.EcoParticipationPrices = new TProductPrice[] { eco_price };

            Product_update.Path = path + alias;
            TLocalizedValue name_de_update = new TLocalizedValue();

            name_de_update.LanguageCode = "de";
            name_de_update.Value        = "verändertes Test-Hauptprodukt";
            TLocalizedValue name_en_update = new TLocalizedValue();

            name_en_update.LanguageCode = "en";
            name_en_update.Value        = "updated test master product";
            Product_update.Name         = new TLocalizedValue[] { name_de_update, name_en_update };

            TLocalizedValue longdesc_de_update = new TLocalizedValue();

            longdesc_de_update.LanguageCode = "de";
            longdesc_de_update.Value        = "Test-Hauptprodukt lange Beschreibung modifiziert";
            TLocalizedValue longdesc_en_update = new TLocalizedValue();

            longdesc_en_update.LanguageCode = "en";
            longdesc_en_update.Value        = "test master product long description updated";
            Product_update.Text             = new TLocalizedValue[] { longdesc_de_update, longdesc_en_update };

            TLocalizedValue title_de_update = new TLocalizedValue();

            title_de_update.LanguageCode = "de";
            title_de_update.Value        = "Seitentitel modifiziert";
            TLocalizedValue title_en_update = new TLocalizedValue();

            title_en_update.LanguageCode = "en";
            title_en_update.Value        = "page title modified";
            Product_update.Title         = new TLocalizedValue[] { title_de_update, title_en_update };

            Product_update.IsVisible     = true; Product_update.IsVisibleSpecified = true;
            Product_update.IsNew         = true;         Product_update.IsNewSpecified = true;
            Product_update.PriceQuantity = (float)1;     Product_update.PriceQuantitySpecified = true;
            Product_update.MinOrder      = (float)1;     Product_update.MinOrderSpecified = true;
            Product_update.IntervalOrder = (float)1;     Product_update.IntervalOrderSpecified = true;

            Product_update.Weight           = (float)240;   Product_update.WeightSpecified = true;
            Product_update.RefAmount        = (float)1;     Product_update.RefAmountSpecified = true;
            Product_update.RefContentAmount = (float)0.240; Product_update.RefContentAmountSpecified = true;

            Product_update.StockLevel      = (float)140;   Product_update.StockLevelSpecified = true;
            Product_update.StockLevelAlert = (float)100;   Product_update.StockLevelAlertSpecified = true;

            Product_update.DeliveryPeriod = "as soon as possible";

            TProductPrice price_update = new TProductPrice();

            price_update.Price           = (float)123.50;
            price_update.CurrencyID      = "EUR";
            price_update.TaxModel        = "gross";
            Product_update.ProductPrices = new TProductPrice[] { price_update };

            TProductPrice manufacturer_price_update = new TProductPrice();

            manufacturer_price_update.Price      = (float)150.50;
            manufacturer_price_update.CurrencyID = "EUR";
            manufacturer_price_update.TaxModel   = "gross";
            Product_update.ManufacturerPrices    = new TProductPrice[] { manufacturer_price_update };

            TProductPrice deposit_price_update = new TProductPrice();

            deposit_price_update.Price      = (float)5.50;
            deposit_price_update.CurrencyID = "EUR";
            deposit_price_update.TaxModel   = "gross";
            Product_update.DepositPrices    = new TProductPrice[] { deposit_price_update };

            TProductPrice prepay_price_update = new TProductPrice();

            prepay_price_update.Price       = (float)10.50;
            prepay_price_update.CurrencyID  = "EUR";
            prepay_price_update.TaxModel    = "gross";
            Product_update.PrepaymentPrices = new TProductPrice[] { prepay_price_update };

            TProductPrice eco_price_update = new TProductPrice();

            eco_price_update.Price                = (float)7.50;
            eco_price_update.CurrencyID           = "EUR";
            eco_price_update.TaxModel             = "gross";
            Product_update.EcoParticipationPrices = new TProductPrice[] { eco_price_update };



            // create test Products that can be used as download product
            Product_down.Alias = alias;
            TLocalizedValue name_de_down = new TLocalizedValue();

            name_de_down.LanguageCode = "de";
            name_de_down.Value        = "Test-Downloadprodukt";
            TLocalizedValue name_en_down = new TLocalizedValue();

            name_en_down.LanguageCode = "en";
            name_en_down.Value        = "test master product";
            Product_down.Name         = new TLocalizedValue[] { name_de, name_en };

            Product_down.Class             = "/Shops/DemoShop/ProductTypes/Shoe";
            Product_down.TaxClass          = "/TaxMatrixGermany/normal";
            Product_down.IsAvailable       = true; Product_in.IsAvailableSpecified = true;
            Product_down.IsDownloadProduct = true;
            Product_down.MaxDownloadTime   = "5";
            Product_down.MaxDownloadCount  = "3";

            TDownload download = new TDownload();

            download.IsExternal = true;
            download.FileName   = "http://www.epages.com/de/download/de-epages6-SEO.pdf";
            download.Position   = "10";
            Product_down.DownloadProductMaps = new TDownload[] { download };
        }