public ItemSeoViewModel(ILoginViewModel loginViewModel, ICatalogOutlineBuilder catalogBuilder, IRepositoryFactory<IStoreRepository> storeRepositoryFactory, IRepositoryFactory<IAppConfigRepository> appConfigRepositoryFactory, IAppConfigEntityFactory appConfigEntityFactory, Item item, IEnumerable<string> languages)
			: base(appConfigRepositoryFactory, appConfigEntityFactory, item.Catalog.DefaultLanguage, languages, item.Code, SeoUrlKeywordTypes.Item)
		{
			_storeRepositoryFactory = storeRepositoryFactory;
			_catalogBuilder = catalogBuilder;
			_loginViewModel = loginViewModel;
			_item = item;

			InitializePropertiesForViewing();
		}
Example #2
0
        public static ItemSubtype GetItemType(Item item)
        {
            ItemSubtype result = ItemSubtype.Product;

            if (item != null)
            {
                var t = item.GetType();
                if (t == typeof(Sku)) result = ItemSubtype.SKU;
                else if (t == typeof(Bundle)) result = ItemSubtype.Bundle;
                else if (t == typeof(Package)) result = ItemSubtype.Package;
                else if (t == typeof(DynamicKit)) result = ItemSubtype.Dynamickit;
            }

            return result;
        }
		protected void CreateFullGraphCatalog(ICatalogRepository client, ref Item[] items, string catalogId)
		{
			var catalogBuilder = CatalogBuilder.BuildCatalog(catalogId).WithCategory("category").WithProducts(2);
			var catalog = catalogBuilder.GetCatalog();
			items = catalogBuilder.GetItems();

			client.Add(catalog);

			foreach (var item in items)
			{
				client.Add(item);
			}

			client.UnitOfWork.Commit();

		}
Example #4
0
 public static int GetItemTypeInt(Item item)
 {
     return (int)GetItemType(item);
 }