예제 #1
0
        public override Task <EntityView> Run(EntityView arg, CommercePipelineExecutionContext context)
        {
            Condition.Requires(arg).IsNotNull($"{Name}: The argument cannot be null.");

            var request = this._viewCommander.CurrentEntityViewArgument(context.CommerceContext);

            var catalogViewsPolicy = context.GetPolicy <KnownCatalogViewsPolicy>();

            var sellableitemstiboattributesviewspolicy = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>();

            var isVariationView = request.ViewName.Equals(catalogViewsPolicy.Variant, StringComparison.OrdinalIgnoreCase);
            var isConnectView   = arg.Name.Equals(catalogViewsPolicy.ConnectSellableItem, StringComparison.OrdinalIgnoreCase);

            // Only proceed if the current entity is a sellable item
            if (!(request.Entity is Sitecore.Commerce.Plugin.Catalog.SellableItem))
            {
                return(Task.FromResult(arg));
            }

            //Make sure we target the correct View
            if (string.IsNullOrWhiteSpace(request.ViewName) ||
                !request.ViewName.Equals(catalogViewsPolicy.Master, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(catalogViewsPolicy.Details, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(sellableitemstiboattributesviewspolicy.ProductVideoGallery, StringComparison.OrdinalIgnoreCase) && !isVariationView && !isConnectView)
            {
                return(Task.FromResult(arg));
            }

            var sellableItem = (Sitecore.Commerce.Plugin.Catalog.SellableItem)request.Entity;

            // See if we are dealing with the base sellable item or one of its variations.
            var  variationId = string.Empty;
            var  targetView  = arg;
            bool isEditView  = false;
            ProductVideoGallery component;

            if (isVariationView && !string.IsNullOrEmpty(arg.ItemId))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <ProductVideoGallery>();
            }
            else if (!string.IsNullOrEmpty(arg.ItemId) && arg.VersionedItemId != ("-1"))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <ProductVideoGallery>();
            }
            else
            {
                component = sellableItem.GetComponent <ProductVideoGallery>(variationId);
            }



            #region 7. Product Video Gallery
            isEditView = !string.IsNullOrEmpty(arg.Action) && arg.Action.Equals(sellableitemstiboattributesviewspolicy.ProductVideoGallery, StringComparison.OrdinalIgnoreCase);
            if (!isEditView)
            {
                // Create a new view and add it to the current entity view.
                var view = new EntityView
                {
                    Name          = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>().ProductVideoGallery,
                    DisplayName   = "Video Gallery",
                    EntityId      = arg.EntityId,
                    DisplayRank   = 14,
                    EntityVersion = arg.EntityVersion,
                    ItemId        = variationId,
                    Icon          = "piece",
                };

                arg.ChildViews.Add(view);
                targetView = view;
            }


            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.AdditionalVideoURLs), component.AdditionalVideoURLs, component.GetDisplayName(nameof(component.AdditionalVideoURLs)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Video_Install_URL), component.Video_Install_URL, component.GetDisplayName(nameof(component.Video_Install_URL)));

            #endregion


            return(Task.FromResult(arg));
        }
예제 #2
0
        public override Task <EntityView> Run(EntityView arg, CommercePipelineExecutionContext context)
        {
            Condition.Requires(arg).IsNotNull($"{Name}: The argument cannot be null.");

            var request = this._viewCommander.CurrentEntityViewArgument(context.CommerceContext);

            var catalogViewsPolicy = context.GetPolicy <KnownCatalogViewsPolicy>();

            var sellableitemstiboattributesviewspolicy = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>();

            var isVariationView = request.ViewName.Equals(catalogViewsPolicy.Variant, StringComparison.OrdinalIgnoreCase);
            var isConnectView   = arg.Name.Equals(catalogViewsPolicy.ConnectSellableItem, StringComparison.OrdinalIgnoreCase);

            // Only proceed if the current entity is a sellable item
            if (!(request.Entity is Sitecore.Commerce.Plugin.Catalog.SellableItem))
            {
                return(Task.FromResult(arg));
            }
            //Make sure we target the correct View
            if (string.IsNullOrWhiteSpace(request.ViewName) ||
                !request.ViewName.Equals(catalogViewsPolicy.Master, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(catalogViewsPolicy.Details, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(sellableitemstiboattributesviewspolicy.OtherSpecifications, StringComparison.OrdinalIgnoreCase) && !isVariationView && !isConnectView)
            {
                return(Task.FromResult(arg));
            }
            var sellableItem = (Sitecore.Commerce.Plugin.Catalog.SellableItem)request.Entity;

            // See if we are dealing with the base sellable item or one of its variations.
            var variationId = string.Empty;
            OtherSpecifications component;

            if (isVariationView && !string.IsNullOrEmpty(arg.ItemId))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <OtherSpecifications>();
            }
            else if (!string.IsNullOrEmpty(arg.ItemId) && arg.VersionedItemId != ("-1"))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <OtherSpecifications>();
            }
            else
            {
                component = sellableItem.GetComponent <OtherSpecifications>(variationId);
            }


            var  targetView = arg;
            bool isEditView = false;


            #region 15. Other Specifications
            isEditView = !string.IsNullOrEmpty(arg.Action) && arg.Action.Equals(sellableitemstiboattributesviewspolicy.OtherSpecifications, StringComparison.OrdinalIgnoreCase);
            if (!isEditView)
            {
                // Create a new view and add it to the current entity view.
                var view = new EntityView
                {
                    Name          = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>().OtherSpecifications,
                    DisplayName   = "Other Specifications",
                    EntityId      = arg.EntityId,
                    DisplayRank   = 8,
                    EntityVersion = arg.EntityVersion,
                    ItemId        = variationId,
                    Icon          = "piece",
                };

                arg.ChildViews.Add(view);
                targetView = view;
            }

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Each_Weight_Gross_Weight_SAP), component.Each_Weight_Gross_Weight_SAP, component.GetDisplayName(nameof(component.Each_Weight_Gross_Weight_SAP)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Warranty_Type), component.Warranty_Type, component.GetDisplayName(nameof(component.Warranty_Type)));

            //AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.DangerousGoodsRegulation), component.DangerousGoodsRegulation, component.GetDisplayName(nameof(component.DangerousGoodsRegulation)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.UN_NA_Number), component.UN_NA_Number, component.GetDisplayName(nameof(component.UN_NA_Number)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.UNSPSC_Code_United_Nations_Code), component.UNSPSC_Code_United_Nations_Code, component.GetDisplayName(nameof(component.UNSPSC_Code_United_Nations_Code)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.NFPA_Storage_Classification), component.NFPA_Storage_Classification, component.GetDisplayName(nameof(component.NFPA_Storage_Classification)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.ORMD_YN), component.ORMD_YN, component.GetDisplayName(nameof(component.ORMD_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Hazmat_YN), component.Hazmat_YN, component.GetDisplayName(nameof(component.Hazmat_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Hazard_Class_Number), component.Hazard_Class_Number, component.GetDisplayName(nameof(component.Hazard_Class_Number)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Kit_SMO_POD), component.Kit_SMO_POD, component.GetDisplayName(nameof(component.Kit_SMO_POD)));


            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mfg_Part_Number_SAP), component.Mfg_Part_Number_SAP, component.GetDisplayName(nameof(component.Mfg_Part_Number_SAP)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Kitchen_Bath), component.Kitchen_Bath, component.GetDisplayName(nameof(component.Kitchen_Bath)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Retail_Price), component.Retail_Price, component.GetDisplayName(nameof(component.Retail_Price)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bowl_Front_To_Back_Length), component.Bowl_Front_To_Back_Length, component.GetDisplayName(nameof(component.Bowl_Front_To_Back_Length)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Residential_Or_Commercial), component.Residential_Or_Commercial, component.GetDisplayName(nameof(component.Residential_Or_Commercial)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Battery_Lifetime_Cycles), component.Battery_Lifetime_Cycles, component.GetDisplayName(nameof(component.Battery_Lifetime_Cycles)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Batteries_Required), component.Batteries_Required, component.GetDisplayName(nameof(component.Batteries_Required)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Included_In_Box), component.Included_In_Box, component.GetDisplayName(nameof(component.Included_In_Box)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Freestanding_Tub_Style), component.Freestanding_Tub_Style, component.GetDisplayName(nameof(component.Freestanding_Tub_Style)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Faucet_Included_YN), component.Faucet_Included_YN, component.GetDisplayName(nameof(component.Faucet_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Removable_YN), component.Removable_YN, component.GetDisplayName(nameof(component.Removable_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Is_Sellable), component.Is_Sellable, component.GetDisplayName(nameof(component.Is_Sellable)));
            #endregion


            return(Task.FromResult(arg));
        }
예제 #3
0
        public override Task <EntityView> Run(EntityView arg, CommercePipelineExecutionContext context)
        {
            Condition.Requires(arg).IsNotNull($"{Name}: The argument cannot be null.");

            var request = this._viewCommander.CurrentEntityViewArgument(context.CommerceContext);

            var catalogViewsPolicy = context.GetPolicy <KnownCatalogViewsPolicy>();

            var sellableitemstiboattributesviewspolicy = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>();

            var isVariationView = request.ViewName.Equals(catalogViewsPolicy.Variant, StringComparison.OrdinalIgnoreCase);
            var isConnectView   = arg.Name.Equals(catalogViewsPolicy.ConnectSellableItem, StringComparison.OrdinalIgnoreCase);

            // Only proceed if the current entity is a sellable item
            if (!(request.Entity is Sitecore.Commerce.Plugin.Catalog.SellableItem))
            {
                return(Task.FromResult(arg));
            }
            // Make sure that we target the correct views
            if (string.IsNullOrEmpty(request.ViewName) ||
                !request.ViewName.Equals(catalogViewsPolicy.Master, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(catalogViewsPolicy.Details, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(sellableitemstiboattributesviewspolicy.GlobalStiboAttributes, StringComparison.OrdinalIgnoreCase) &&
                !isVariationView &&
                !isConnectView)
            {
                return(Task.FromResult(arg));
            }

            var sellableItem = (Sitecore.Commerce.Plugin.Catalog.SellableItem)request.Entity;
            GlobalStiboAttributes component;
            // See if we are dealing with the base sellable item or one of its variations.
            var variationId = string.Empty;

            if (isVariationView && !string.IsNullOrEmpty(arg.ItemId))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <GlobalStiboAttributes>();
            }
            else if (!string.IsNullOrEmpty(arg.ItemId) && arg.VersionedItemId != ("-1"))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <GlobalStiboAttributes>();
            }
            else
            {
                component = sellableItem.GetComponent <GlobalStiboAttributes>(variationId);
            }

            var  targetView = arg;
            bool isEditView = false;

            #region 16. Global Stibo Attributes
            isEditView = !string.IsNullOrEmpty(arg.Action) && arg.Action.Equals(sellableitemstiboattributesviewspolicy.GlobalStiboAttributes, StringComparison.OrdinalIgnoreCase);
            if (!isEditView)
            {
                // Create a new view and add it to the current entity view.
                var view = new EntityView
                {
                    Name          = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>().GlobalStiboAttributes,
                    DisplayName   = "Global Stibo Attributes",
                    EntityId      = arg.EntityId,
                    DisplayRank   = 5,
                    EntityVersion = arg.EntityVersion,
                    ItemId        = variationId,
                    Icon          = "piece",
                };

                arg.ChildViews.Add(view);
                targetView = view;
            }

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Is_Discontinued), component.Is_Discontinued, component.GetDisplayName(nameof(component.Is_Discontinued)));


            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Base_UOM_SAP), component.Base_UOM_SAP, component.GetDisplayName(nameof(component.Base_UOM_SAP)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.AltUOMConvFac), component.AltUOMConvFac, component.GetDisplayName(nameof(component.AltUOMConvFac)));


            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.SKU_Status), component.SKU_Status, component.GetDisplayName(nameof(component.SKU_Status)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Product_Status), component.Product_Status, component.GetDisplayName(nameof(component.Product_Status)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.SAP_SKU_Status_SAP), component.SAP_SKU_Status_SAP, component.GetDisplayName(nameof(component.SAP_SKU_Status_SAP)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Stock_Level_SAP), component.Stock_Level_SAP, component.GetDisplayName(nameof(component.Stock_Level_SAP)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Small_Parcel_Postable_SAP_YN), component.Small_Parcel_Postable_SAP_YN, component.GetDisplayName(nameof(component.Small_Parcel_Postable_SAP_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.SAPLink), component.SAPLink, component.GetDisplayName(nameof(component.SAPLink)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.DC_Location), component.DC_Location, component.GetDisplayName(nameof(component.DC_Location)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.MTO_or_MTS), component.MTO_or_MTS, component.GetDisplayName(nameof(component.MTO_or_MTS)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.ParentNumber), component.ParentNumber, component.GetDisplayName(nameof(component.ParentNumber)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Pkg_Component_1), component.Pkg_Component_1, component.GetDisplayName(nameof(component.Pkg_Component_1)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shipping_Plants_SAP), component.Shipping_Plants_SAP, component.GetDisplayName(nameof(component.Shipping_Plants_SAP)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_No_Of_Showerheads), component.Shower_No_Of_Showerheads, component.GetDisplayName(nameof(component.Shower_No_Of_Showerheads)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Hand_Shower_Included_YN), component.Hand_Shower_Included_YN, component.GetDisplayName(nameof(component.Hand_Shower_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_Application), component.Bath_Accessory_Application, component.GetDisplayName(nameof(component.Bath_Accessory_Application)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_No_Of_Pieces), component.Sink_No_Of_Pieces, component.GetDisplayName(nameof(component.Sink_No_Of_Pieces)));
            #endregion


            return(Task.FromResult(arg));
        }
        public override Task <EntityView> Run(EntityView arg, CommercePipelineExecutionContext context)
        {
            Condition.Requires(arg).IsNotNull($"{Name}: The argument cannot be null.");

            var request = this._viewCommander.CurrentEntityViewArgument(context.CommerceContext);

            var catalogViewsPolicy = context.GetPolicy <KnownCatalogViewsPolicy>();

            var sellableitemstiboattributesviewspolicy = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>();

            var isVariationView = request.ViewName.Equals(catalogViewsPolicy.Variant, StringComparison.OrdinalIgnoreCase);
            var isConnectView   = arg.Name.Equals(catalogViewsPolicy.ConnectSellableItem, StringComparison.OrdinalIgnoreCase);

            // Only proceed if the current entity is a sellable item
            if (!(request.Entity is Sitecore.Commerce.Plugin.Catalog.SellableItem))
            {
                return(Task.FromResult(arg));
            }
            //Make sure we target the correct View
            if (string.IsNullOrWhiteSpace(request.ViewName) ||
                !request.ViewName.Equals(catalogViewsPolicy.Master, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(catalogViewsPolicy.Details, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(sellableitemstiboattributesviewspolicy.ContentManageableAttributes, StringComparison.OrdinalIgnoreCase) && !isVariationView && !isConnectView)
            {
                return(Task.FromResult(arg));
            }


            var sellableItem = (Sitecore.Commerce.Plugin.Catalog.SellableItem)request.Entity;

            // See if we are dealing with the base sellable item or one of its variations.
            var variationId = string.Empty;
            ContentManageableAttributes component;

            if (isVariationView && !string.IsNullOrEmpty(arg.ItemId))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <ContentManageableAttributes>();
            }
            else if (!string.IsNullOrEmpty(arg.ItemId) && arg.VersionedItemId != ("-1"))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <ContentManageableAttributes>();
            }
            else
            {
                component = sellableItem.GetComponent <ContentManageableAttributes>(variationId);
            }

            var  targetView = arg;
            bool isEditView = false;


            #region 31. Custum Stibo Attribute
            isEditView = !string.IsNullOrEmpty(arg.Action) && arg.Action.Equals(sellableitemstiboattributesviewspolicy.ContentManageableAttributes, StringComparison.OrdinalIgnoreCase);
            if (!isEditView)
            {
                // Create a new view and add it to the current entity view.
                var view = new EntityView
                {
                    Name          = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>().ContentManageableAttributes,
                    DisplayName   = "Content Manageable Attributes",
                    EntityId      = arg.EntityId,
                    DisplayRank   = 3,
                    EntityVersion = arg.EntityVersion,
                    ItemId        = variationId,
                    Icon          = "piece",
                };

                arg.ChildViews.Add(view);
                targetView = view;
            }

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.EditableField, nameof(component.Mfg_Product_Number_SAP), component.Mfg_Product_Number_SAP, component.GetDisplayName(nameof(component.Mfg_Product_Number_SAP)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.EditableField, nameof(component.Product_Family_SAP), component.Product_Family_SAP, component.GetDisplayName(nameof(component.Product_Family_SAP)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.EditableField, nameof(component.Material_Description_Marketing), component.Material_Description_Marketing, component.GetDisplayName(nameof(component.Material_Description_Marketing)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.EditableField, nameof(component.Marketing_Copy), component.Marketing_Copy, component.GetDisplayName(nameof(component.Marketing_Copy)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.EditableField, nameof(component.Products_Use_This_Part), component.Products_Use_This_Part, component.GetDisplayName(nameof(component.Products_Use_This_Part)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.EditableField, nameof(component.Related_Products), component.Related_Products, component.GetDisplayName(nameof(component.Related_Products)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.EditableField, nameof(component.Lead_Law_Compliant_YN), component.Lead_Law_Compliant_YN, component.GetDisplayName(nameof(component.Lead_Law_Compliant_YN)));

            #endregion
            return(Task.FromResult(arg));
        }
예제 #5
0
        public override Task <EntityView> Run(EntityView arg, CommercePipelineExecutionContext context)
        {
            Condition.Requires(arg).IsNotNull($"{Name}: The argument cannot be null.");

            var request = this._viewCommander.CurrentEntityViewArgument(context.CommerceContext);

            var catalogViewsPolicy = context.GetPolicy <KnownCatalogViewsPolicy>();

            var sellableitemstiboattributesviewspolicy = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>();

            var isVariationView = request.ViewName.Equals(catalogViewsPolicy.Variant, StringComparison.OrdinalIgnoreCase);
            var isConnectView   = arg.Name.Equals(catalogViewsPolicy.ConnectSellableItem, StringComparison.OrdinalIgnoreCase);

            // Make sure that we target the correct views
            if (string.IsNullOrEmpty(request.ViewName) ||
                !request.ViewName.Equals(catalogViewsPolicy.Master, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(catalogViewsPolicy.Details, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(sellableitemstiboattributesviewspolicy.ProductOverview, StringComparison.OrdinalIgnoreCase) &&
                !isVariationView &&
                !isConnectView)
            {
                return(Task.FromResult(arg));
            }

            // Only proceed if the current entity is a sellable item
            if (!(request.Entity is Sitecore.Commerce.Plugin.Catalog.SellableItem))
            {
                return(Task.FromResult(arg));
            }

            var sellableItem = (Sitecore.Commerce.Plugin.Catalog.SellableItem)request.Entity;

            // See if we are dealing with the base sellable item or one of its variations.
            var             variationId = string.Empty;
            ProductOverview component;

            if (isVariationView && !string.IsNullOrEmpty(arg.ItemId))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <ProductOverview>();
            }
            else if (!string.IsNullOrEmpty(arg.ItemId) && arg.VersionedItemId != ("-1"))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <ProductOverview>();
            }
            else
            {
                component = sellableItem.GetComponent <ProductOverview>(variationId);
            }

            var  targetView = arg;
            bool isEditView = false;


            #region 1. Product Overview

            // Check if the edit action was requested
            isEditView = !string.IsNullOrEmpty(arg.Action) && arg.Action.Equals(sellableitemstiboattributesviewspolicy.ProductOverview, StringComparison.OrdinalIgnoreCase);

            if (!isEditView)
            {
                // Create a new view and add it to the current entity view.
                var view = new EntityView
                {
                    Name          = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>().ProductOverview,
                    DisplayName   = "Product Overview",
                    EntityId      = arg.EntityId,
                    DisplayRank   = 11,
                    EntityVersion = arg.EntityVersion,
                    ItemId        = variationId,
                    Icon          = "piece",
                };

                arg.ChildViews.Add(view);
                targetView = view;
            }


            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.UPC_EAN_SAP), component.UPC_EAN_SAP, component.GetDisplayName(nameof(component.UPC_EAN_SAP)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Restricted_States_Regulated), component.Restricted_States_Regulated, component.GetDisplayName(nameof(component.Restricted_States_Regulated)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Color_Code_SAP), component.Color_Code_SAP, component.GetDisplayName(nameof(component.Color_Code_SAP)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Color_Variant), component.Color_Variant, component.GetDisplayName(nameof(component.Color_Variant)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Customer_Exclusive_Material_YN), component.Customer_Exclusive_Material_YN, component.GetDisplayName(nameof(component.Customer_Exclusive_Material_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Grohe_MOT), component.Grohe_MOT, component.GetDisplayName(nameof(component.Grohe_MOT)));

            #endregion
            return(Task.FromResult(arg));
        }
        public override Task <EntityView> Run(EntityView arg, CommercePipelineExecutionContext context)
        {
            Condition.Requires(arg).IsNotNull($"{Name}: The argument cannot be null.");

            var request = this._viewCommander.CurrentEntityViewArgument(context.CommerceContext);

            var catalogViewsPolicy = context.GetPolicy <KnownCatalogViewsPolicy>();

            var sellableitemstiboattributesviewspolicy = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>();

            var isVariationView = request.ViewName.Equals(catalogViewsPolicy.Variant, StringComparison.OrdinalIgnoreCase);
            var isConnectView   = arg.Name.Equals(catalogViewsPolicy.ConnectSellableItem, StringComparison.OrdinalIgnoreCase);

            // Only proceed if the current entity is a sellable item or Category
            if ((request.Entity is Sitecore.Commerce.Plugin.Catalog.Category) || (request.Entity is Sitecore.Commerce.Plugin.Catalog.SellableItem))
            {
                // Make sure that we target the correct views
                if (string.IsNullOrEmpty(request.ViewName) ||
                    !request.ViewName.Equals(catalogViewsPolicy.Master, StringComparison.OrdinalIgnoreCase) &&
                    !request.ViewName.Equals(catalogViewsPolicy.Details, StringComparison.OrdinalIgnoreCase) &&
                    !request.ViewName.Equals(sellableitemstiboattributesviewspolicy.CategoryAttributes, StringComparison.OrdinalIgnoreCase) &&
                    !isVariationView &&
                    !isConnectView)
                {
                    return(Task.FromResult(arg));
                }
                Sitecore.Commerce.Plugin.Catalog.SellableItem sellableItem = null; Sitecore.Commerce.Plugin.Catalog.Category category = null; var variationId = string.Empty;
                if (request.Entity is Sitecore.Commerce.Plugin.Catalog.SellableItem)
                {
                    sellableItem = (Sitecore.Commerce.Plugin.Catalog.SellableItem)request.Entity;
                }
                if (request.Entity is Sitecore.Commerce.Plugin.Catalog.Category)
                {
                    category = (Sitecore.Commerce.Plugin.Catalog.Category)request.Entity;
                }


                CategoryAttributes component = null;
                if (category != null)
                {
                    component = category.GetComponent <CategoryAttributes>();
                }

                // See if we are dealing with the base sellable item or one of its variations.
                if (sellableItem != null)
                {
                    if (isVariationView && !string.IsNullOrEmpty(arg.ItemId))
                    {
                        variationId = arg.ItemId;
                        component   = sellableItem.GetVariation(variationId).GetComponent <CategoryAttributes>();
                    }
                    else if (!string.IsNullOrEmpty(arg.ItemId) && arg.VersionedItemId != ("-1"))
                    {
                        variationId = arg.ItemId;
                        component   = sellableItem.GetVariation(variationId).GetComponent <CategoryAttributes>();
                    }
                    else
                    {
                        component = sellableItem.GetComponent <CategoryAttributes>(variationId);
                    }
                }

                var  targetView = arg;
                bool isEditView = false;

                #region 16. Category Mapping
                isEditView = !string.IsNullOrEmpty(arg.Action) && arg.Action.Equals(sellableitemstiboattributesviewspolicy.CategoryAttributes, StringComparison.OrdinalIgnoreCase);
                if (!isEditView)
                {
                    // Create a new view and add it to the current entity view.
                    var view = new EntityView
                    {
                        Name          = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>().CategoryAttributes,
                        DisplayName   = "Category Mapping",
                        EntityId      = arg.EntityId,
                        DisplayRank   = 2,
                        EntityVersion = arg.EntityVersion,
                        ItemId        = variationId,
                        Icon          = "piece",
                    };

                    arg.ChildViews.Add(view);
                    targetView = view;
                }

                AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.SitecoreMappingPath), component.SitecoreMappingPath, component.GetDisplayName(nameof(component.SitecoreMappingPath)));

                AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.ClassificationType), component.ClassificationType, component.GetDisplayName(nameof(component.ClassificationType)));
                #endregion
            }
            return(Task.FromResult(arg));
        }
예제 #7
0
        public override Task <EntityView> Run(EntityView arg, CommercePipelineExecutionContext context)
        {
            Condition.Requires(arg).IsNotNull($"{Name}: The argument cannot be null.");

            var request = this._viewCommander.CurrentEntityViewArgument(context.CommerceContext);

            var catalogViewsPolicy = context.GetPolicy <KnownCatalogViewsPolicy>();

            var sellableitemstiboattributesviewspolicy = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>();

            var isVariationView = request.ViewName.Equals(catalogViewsPolicy.Variant, StringComparison.OrdinalIgnoreCase);
            var isConnectView   = arg.Name.Equals(catalogViewsPolicy.ConnectSellableItem, StringComparison.OrdinalIgnoreCase);

            // Only proceed if the current entity is a sellable item
            if (!(request.Entity is Sitecore.Commerce.Plugin.Catalog.SellableItem))
            {
                return(Task.FromResult(arg));
            }

            // Make sure that we target the correct views
            if (string.IsNullOrEmpty(request.ViewName) ||
                !request.ViewName.Equals(catalogViewsPolicy.Master, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(catalogViewsPolicy.Details, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(sellableitemstiboattributesviewspolicy.ProductFeatures, StringComparison.OrdinalIgnoreCase) &&
                !isVariationView &&
                !isConnectView)
            {
                return(Task.FromResult(arg));
            }

            var sellableItem = (Sitecore.Commerce.Plugin.Catalog.SellableItem)request.Entity;

            // See if we are dealing with the base sellable item or one of its variations.
            var             variationId = string.Empty;
            ProductFeatures component;

            if (isVariationView && !string.IsNullOrEmpty(arg.ItemId))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <ProductFeatures>();
            }
            else if (!string.IsNullOrEmpty(arg.ItemId) && arg.VersionedItemId != ("-1"))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <ProductFeatures>();
            }
            else
            {
                component = sellableItem.GetComponent <ProductFeatures>(variationId);
            }

            var  targetView = arg;
            bool isEditView = false;


            #region 9. Features
            isEditView = !string.IsNullOrEmpty(arg.Action) && arg.Action.Equals(sellableitemstiboattributesviewspolicy.ProductFeatures, StringComparison.OrdinalIgnoreCase);
            if (!isEditView)
            {
                // Create a new view and add it to the current entity view.
                var view = new EntityView
                {
                    Name          = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>().ProductFeatures,
                    DisplayName   = "Features",
                    EntityId      = arg.EntityId,
                    DisplayRank   = 4,
                    EntityVersion = arg.EntityVersion,
                    ItemId        = variationId,
                    Icon          = "piece",
                };

                arg.ChildViews.Add(view);
                targetView = view;
            }

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Marketing_Claims_1), component.Marketing_Claims_1, component.GetDisplayName(nameof(component.Marketing_Claims_1)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mirror_Bath_Product_Type), component.Mirror_Bath_Product_Type, component.GetDisplayName(nameof(component.Mirror_Bath_Product_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mirror_Beveled_Frame_YN), component.Mirror_Beveled_Frame_YN, component.GetDisplayName(nameof(component.Mirror_Beveled_Frame_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mirror_Frame_Finish_Family), component.Mirror_Frame_Finish_Family, component.GetDisplayName(nameof(component.Mirror_Frame_Finish_Family)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Features), component.Fitting_Features, component.GetDisplayName(nameof(component.Fitting_Features)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Feature_Bullets_1), component.Feature_Bullets_1, component.GetDisplayName(nameof(component.Feature_Bullets_1)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Feature_Bullets_2), component.Feature_Bullets_2, component.GetDisplayName(nameof(component.Feature_Bullets_2)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Feature_Bullets_3), component.Feature_Bullets_3, component.GetDisplayName(nameof(component.Feature_Bullets_3)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Feature_Bullets_4), component.Feature_Bullets_4, component.GetDisplayName(nameof(component.Feature_Bullets_4)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Feature_Bullets_5), component.Feature_Bullets_5, component.GetDisplayName(nameof(component.Feature_Bullets_5)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Feature_Bullets_6), component.Feature_Bullets_6, component.GetDisplayName(nameof(component.Feature_Bullets_6)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Feature_Bullets_7), component.Feature_Bullets_7, component.GetDisplayName(nameof(component.Feature_Bullets_7)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Feature_Bullets_8), component.Feature_Bullets_8, component.GetDisplayName(nameof(component.Feature_Bullets_8)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Feature_Bullets_9), component.Feature_Bullets_9, component.GetDisplayName(nameof(component.Feature_Bullets_9)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Feature_Bullets_10), component.Feature_Bullets_10, component.GetDisplayName(nameof(component.Feature_Bullets_10)));
            #endregion


            return(Task.FromResult(arg));
        }
예제 #8
0
        public override Task <EntityView> Run(EntityView arg, CommercePipelineExecutionContext context)
        {
            Condition.Requires(arg).IsNotNull($"{Name}: The argument cannot be null.");

            var request = this._viewCommander.CurrentEntityViewArgument(context.CommerceContext);

            var catalogViewsPolicy = context.GetPolicy <KnownCatalogViewsPolicy>();

            var sellableitemstiboattributesviewspolicy = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>();

            var isVariationView = request.ViewName.Equals(catalogViewsPolicy.Variant, StringComparison.OrdinalIgnoreCase);
            var isConnectView   = arg.Name.Equals(catalogViewsPolicy.ConnectSellableItem, StringComparison.OrdinalIgnoreCase);

            // Only proceed if the current entity is a sellable item
            if (!(request.Entity is Sitecore.Commerce.Plugin.Catalog.SellableItem))
            {
                return(Task.FromResult(arg));
            }

            // Make sure that we target the correct views
            if (string.IsNullOrEmpty(request.ViewName) ||
                !request.ViewName.Equals(catalogViewsPolicy.Master, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(catalogViewsPolicy.Details, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(sellableitemstiboattributesviewspolicy.SellableItemFacets, StringComparison.OrdinalIgnoreCase) &&
                !isVariationView &&
                !isConnectView)
            {
                return(Task.FromResult(arg));
            }

            var sellableItem = (Sitecore.Commerce.Plugin.Catalog.SellableItem)request.Entity;
            var targetView   = arg;
            SellableItemFacets component;
            bool isEditView = false;

            // See if we are dealing with the base sellable item or one of its variations.
            var variationId = string.Empty;

            if (isVariationView && !string.IsNullOrEmpty(arg.ItemId))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <SellableItemFacets>();
            }
            else if (!string.IsNullOrEmpty(arg.ItemId) && arg.VersionedItemId != ("-1"))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <SellableItemFacets>();
            }
            else
            {
                component = sellableItem.GetComponent <SellableItemFacets>(variationId);
            }


            #region 15. Sellable Item Facets
            isEditView = !string.IsNullOrEmpty(arg.Action) && arg.Action.Equals(sellableitemstiboattributesviewspolicy.SellableItemFacets, StringComparison.OrdinalIgnoreCase);
            if (!isEditView)
            {
                // Create a new view and add it to the current entity view.
                var view = new EntityView
                {
                    Name          = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>().SellableItemFacets,
                    DisplayName   = "Product Facets",
                    EntityId      = arg.EntityId,
                    DisplayRank   = 10,
                    EntityVersion = arg.EntityVersion,
                    ItemId        = variationId,
                    Icon          = "piece",
                };

                arg.ChildViews.Add(view);
                targetView = view;
            }


            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Item_Shape), component.Item_Shape, component.GetDisplayName(nameof(component.Item_Shape)));
            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Features), component.Features, component.GetDisplayName(nameof(component.Features)));
            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Certifications), component.Certifications, component.GetDisplayName(nameof(component.Certifications)));
            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Water_Type), component.Water_Type, component.GetDisplayName(nameof(component.Water_Type)));
            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Type), component.Shower_Type, component.GetDisplayName(nameof(component.Shower_Type)));
            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Dimensions), component.Dimensions, component.GetDisplayName(nameof(component.Dimensions)));
            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Flow_Rate), component.Flow_Rate, component.GetDisplayName(nameof(component.Flow_Rate)));
            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Dimensions), component.Tub_Dimensions, component.GetDisplayName(nameof(component.Tub_Dimensions)));
            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Vanity_Assembled_Dimensions), component.Vanity_Assembled_Dimensions, component.GetDisplayName(nameof(component.Vanity_Assembled_Dimensions)));
            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Vanity_Cabinet_Dimensions), component.Vanity_Cabinet_Dimensions, component.GetDisplayName(nameof(component.Vanity_Cabinet_Dimensions)));
            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Drain_Opening_Size), component.Drain_Opening_Size, component.GetDisplayName(nameof(component.Drain_Opening_Size)));
            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Toilet_Seat_Inside_Length), component.Toilet_Seat_Inside_Length, component.GetDisplayName(nameof(component.Toilet_Seat_Inside_Length)));

            #endregion


            return(Task.FromResult(arg));
        }
예제 #9
0
        public override Task <EntityView> Run(EntityView arg, CommercePipelineExecutionContext context)
        {
            Condition.Requires(arg).IsNotNull($"{Name}: The argument cannot be null.");

            var request = this._viewCommander.CurrentEntityViewArgument(context.CommerceContext);

            var catalogViewsPolicy = context.GetPolicy <KnownCatalogViewsPolicy>();

            var sellableitemstiboattributesviewspolicy = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>();

            var isVariationView = request.ViewName.Equals(catalogViewsPolicy.Variant, StringComparison.OrdinalIgnoreCase);
            var isConnectView   = arg.Name.Equals(catalogViewsPolicy.ConnectSellableItem, StringComparison.OrdinalIgnoreCase);

            // Only proceed if the current entity is a sellable item
            if (!(request.Entity is Sitecore.Commerce.Plugin.Catalog.SellableItem))
            {
                return(Task.FromResult(arg));
            }
            //Make sure we target the correct View
            if (string.IsNullOrWhiteSpace(request.ViewName) ||
                !request.ViewName.Equals(catalogViewsPolicy.Master, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(catalogViewsPolicy.Details, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(sellableitemstiboattributesviewspolicy.TechnicalSpecification, StringComparison.OrdinalIgnoreCase) && !isVariationView && !isConnectView)
            {
                return(Task.FromResult(arg));
            }

            var sellableItem = (Sitecore.Commerce.Plugin.Catalog.SellableItem)request.Entity;

            // See if we are dealing with the base sellable item or one of its variations.
            var variationId = string.Empty;
            TechnicalSpecification component;
            var  targetView = arg;
            bool isEditView = false;

            if (isVariationView && !string.IsNullOrEmpty(arg.ItemId))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <TechnicalSpecification>();
            }
            else if (!string.IsNullOrEmpty(arg.ItemId) && arg.VersionedItemId != ("-1"))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <TechnicalSpecification>();
            }
            else
            {
                component = sellableItem.GetComponent <TechnicalSpecification>(variationId);
            }

            #region 14. TechnicalSpecification
            isEditView = !string.IsNullOrEmpty(arg.Action) && arg.Action.Equals(sellableitemstiboattributesviewspolicy.TechnicalSpecification, StringComparison.OrdinalIgnoreCase);
            if (!isEditView)
            {
                // Create a new view and add it to the current entity view.
                var view = new EntityView
                {
                    Name          = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>().TechnicalSpecification,
                    DisplayName   = "Technical Specifications",
                    EntityId      = arg.EntityId,
                    DisplayRank   = 13,
                    EntityVersion = arg.EntityVersion,
                    ItemId        = variationId,
                    Icon          = "piece",
                };

                arg.ChildViews.Add(view);
                targetView = view;
            }

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mirror_Hardware_Included_YN), component.Mirror_Hardware_Included_YN, component.GetDisplayName(nameof(component.Mirror_Hardware_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mirror_Mount_Location), component.Mirror_Mount_Location, component.GetDisplayName(nameof(component.Mirror_Mount_Location)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Number_Output_Valves_Connection), component.Number_Output_Valves_Connection, component.GetDisplayName(nameof(component.Number_Output_Valves_Connection)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Output_Connection_Type), component.Output_Connection_Type, component.GetDisplayName(nameof(component.Output_Connection_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Rough_In_Valve), component.Shower_Rough_In_Valve, component.GetDisplayName(nameof(component.Shower_Rough_In_Valve)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Connection_Size_Input), component.Fitting_Connection_Size_Input, component.GetDisplayName(nameof(component.Fitting_Connection_Size_Input)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Handle_Height), component.Fitting_Handle_Height, component.GetDisplayName(nameof(component.Fitting_Handle_Height)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Handle_Type), component.Fitting_Handle_Type, component.GetDisplayName(nameof(component.Fitting_Handle_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Hose_Length), component.Fitting_Hose_Length, component.GetDisplayName(nameof(component.Fitting_Hose_Length)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Max_Deck_Thickness), component.Fitting_Max_Deck_Thickness, component.GetDisplayName(nameof(component.Fitting_Max_Deck_Thickness)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Max_Deck_Thickness_w_Escutcheon), component.Fitting_Max_Deck_Thickness_w_Escutcheon, component.GetDisplayName(nameof(component.Fitting_Max_Deck_Thickness_w_Escutcheon)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_No_Of_Holes_Required), component.Fitting_No_Of_Holes_Required, component.GetDisplayName(nameof(component.Fitting_No_Of_Holes_Required)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Speed_Connect_YN), component.Fitting_Speed_Connect_YN, component.GetDisplayName(nameof(component.Fitting_Speed_Connect_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Spout_Height), component.Fitting_Spout_Height, component.GetDisplayName(nameof(component.Fitting_Spout_Height)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Depth), component.Tub_Depth, component.GetDisplayName(nameof(component.Tub_Depth)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Overflow_Height), component.Tub_Overflow_Height, component.GetDisplayName(nameof(component.Tub_Overflow_Height)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Water_Depth), component.Tub_Water_Depth, component.GetDisplayName(nameof(component.Tub_Water_Depth)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Spout_Reach), component.Fitting_Spout_Reach, component.GetDisplayName(nameof(component.Fitting_Spout_Reach)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Swivel_Degrees), component.Fitting_Swivel_Degrees, component.GetDisplayName(nameof(component.Fitting_Swivel_Degrees)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Valve_Needed_For_Install_YN), component.Fitting_Valve_Needed_For_Install_YN, component.GetDisplayName(nameof(component.Fitting_Valve_Needed_For_Install_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.FlowRateGPC), component.FlowRateGPC, component.GetDisplayName(nameof(component.FlowRateGPC)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Handle_Length), component.Handle_Length, component.GetDisplayName(nameof(component.Handle_Length)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Operating_Pressure_Static), component.Operating_Pressure_Static, component.GetDisplayName(nameof(component.Operating_Pressure_Static)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Handle_To_Handle_Measurement), component.Handle_To_Handle_Measurement, component.GetDisplayName(nameof(component.Handle_To_Handle_Measurement)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Valve_Material), component.Fitting_Valve_Material, component.GetDisplayName(nameof(component.Fitting_Valve_Material)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Hose_Included_YN), component.Hose_Included_YN, component.GetDisplayName(nameof(component.Hose_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Input_Connection_Type), component.Input_Connection_Type, component.GetDisplayName(nameof(component.Input_Connection_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Installation_Hardware_Included), component.Installation_Hardware_Included, component.GetDisplayName(nameof(component.Installation_Hardware_Included)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Wattage), component.Tub_Wattage, component.GetDisplayName(nameof(component.Tub_Wattage)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Blower_Placement), component.Tub_Blower_Placement, component.GetDisplayName(nameof(component.Tub_Blower_Placement)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Pump_Placement), component.Tub_Pump_Placement, component.GetDisplayName(nameof(component.Tub_Pump_Placement)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Pump_Speeds), component.Tub_Pump_Speeds, component.GetDisplayName(nameof(component.Tub_Pump_Speeds)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Sound_Dampening), component.Tub_Sound_Dampening, component.GetDisplayName(nameof(component.Tub_Sound_Dampening)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Predrilled_Holes_YN), component.Sink_Predrilled_Holes_YN, component.GetDisplayName(nameof(component.Sink_Predrilled_Holes_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Number_Of_Toilet_Trapways), component.Number_Of_Toilet_Trapways, component.GetDisplayName(nameof(component.Number_Of_Toilet_Trapways)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Number_Of_Toilet_Flush_Valves), component.Number_Of_Toilet_Flush_Valves, component.GetDisplayName(nameof(component.Number_Of_Toilet_Flush_Valves)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mold), component.Mold, component.GetDisplayName(nameof(component.Mold)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bidet_No_Of_Dryer_Settings), component.Bidet_No_Of_Dryer_Settings, component.GetDisplayName(nameof(component.Bidet_No_Of_Dryer_Settings)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bidet_No_Of_Spray_Nozzles), component.Bidet_No_Of_Spray_Nozzles, component.GetDisplayName(nameof(component.Bidet_No_Of_Spray_Nozzles)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bidet_No_Of_Water_Control_Settings), component.Bidet_No_Of_Water_Control_Settings, component.GetDisplayName(nameof(component.Bidet_No_Of_Water_Control_Settings)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bidet_Remote_Included_YN), component.Bidet_Remote_Included_YN, component.GetDisplayName(nameof(component.Bidet_Remote_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Fitting_Bidet_Spray_Type), component.Bath_Fitting_Bidet_Spray_Type, component.GetDisplayName(nameof(component.Bath_Fitting_Bidet_Spray_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Power_Cord_Length), component.Power_Cord_Length, component.GetDisplayName(nameof(component.Power_Cord_Length)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Toilet_Seat_Front_Type), component.Toilet_Seat_Front_Type, component.GetDisplayName(nameof(component.Toilet_Seat_Front_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Flushing_Mechanism), component.Flushing_Mechanism, component.GetDisplayName(nameof(component.Flushing_Mechanism)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.No_Of_Batteries_Included), component.No_Of_Batteries_Included, component.GetDisplayName(nameof(component.No_Of_Batteries_Included)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Base_No_Finished_Sides), component.Shower_Base_No_Finished_Sides, component.GetDisplayName(nameof(component.Shower_Base_No_Finished_Sides)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Base_Number_Of_Curbs), component.Shower_Base_Number_Of_Curbs, component.GetDisplayName(nameof(component.Shower_Base_Number_Of_Curbs)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Door_Glass_Thickness), component.Door_Glass_Thickness, component.GetDisplayName(nameof(component.Door_Glass_Thickness)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Door_Hinged_YN), component.Door_Hinged_YN, component.GetDisplayName(nameof(component.Door_Hinged_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Door_Usage), component.Door_Usage, component.GetDisplayName(nameof(component.Door_Usage)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Drain_Location), component.Drain_Location, component.GetDisplayName(nameof(component.Drain_Location)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Towel_Bar_Included_YN), component.Towel_Bar_Included_YN, component.GetDisplayName(nameof(component.Towel_Bar_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Shower_Door_Width), component.Tub_Shower_Door_Width, component.GetDisplayName(nameof(component.Tub_Shower_Door_Width)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Wall_Caulkless_YN), component.Shower_Wall_Caulkless_YN, component.GetDisplayName(nameof(component.Shower_Wall_Caulkless_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Wall_Construction), component.Shower_Wall_Construction, component.GetDisplayName(nameof(component.Shower_Wall_Construction)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Wall_Surface), component.Shower_Wall_Surface, component.GetDisplayName(nameof(component.Shower_Wall_Surface)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bowl_Right_Side_Below_Counter_Depth), component.Bowl_Right_Side_Below_Counter_Depth, component.GetDisplayName(nameof(component.Bowl_Right_Side_Below_Counter_Depth)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Cut_Out_Below_Counter_Depth), component.Sink_Cut_Out_Below_Counter_Depth, component.GetDisplayName(nameof(component.Sink_Cut_Out_Below_Counter_Depth)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Cut_Out_Front_To_Back_Width), component.Sink_Cut_Out_Front_To_Back_Width, component.GetDisplayName(nameof(component.Sink_Cut_Out_Front_To_Back_Width)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Cut_Out_Left_To_Right_Length), component.Sink_Cut_Out_Left_To_Right_Length, component.GetDisplayName(nameof(component.Sink_Cut_Out_Left_To_Right_Length)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Depth_To_Overflow), component.Sink_Depth_To_Overflow, component.GetDisplayName(nameof(component.Sink_Depth_To_Overflow)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Minimum_Cabinet_Size), component.Sink_Minimum_Cabinet_Size, component.GetDisplayName(nameof(component.Sink_Minimum_Cabinet_Size)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Overflow_Location), component.Sink_Overflow_Location, component.GetDisplayName(nameof(component.Sink_Overflow_Location)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Blower), component.Tub_Blower, component.GetDisplayName(nameof(component.Tub_Blower)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Pump_Amperage), component.Tub_Pump_Amperage, component.GetDisplayName(nameof(component.Tub_Pump_Amperage)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Water_Capacity), component.Tub_Water_Capacity, component.GetDisplayName(nameof(component.Tub_Water_Capacity)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Bowl_Below_Counter_Depth), component.Sink_Bowl_Below_Counter_Depth, component.GetDisplayName(nameof(component.Sink_Bowl_Below_Counter_Depth)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Front_To_Back_Width), component.Sink_Front_To_Back_Width, component.GetDisplayName(nameof(component.Sink_Front_To_Back_Width)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Left_To_Right_Length), component.Sink_Left_To_Right_Length, component.GetDisplayName(nameof(component.Sink_Left_To_Right_Length)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Top_To_Bottom_Depth), component.Sink_Top_To_Bottom_Depth, component.GetDisplayName(nameof(component.Sink_Top_To_Bottom_Depth)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sump_Length), component.Sump_Length, component.GetDisplayName(nameof(component.Sump_Length)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sump_Width), component.Sump_Width, component.GetDisplayName(nameof(component.Sump_Width)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Soaking_Depth), component.Soaking_Depth, component.GetDisplayName(nameof(component.Soaking_Depth)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Flow_Rate), component.Flow_Rate, component.GetDisplayName(nameof(component.Flow_Rate)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Flush_Technology), component.Flush_Technology, component.GetDisplayName(nameof(component.Flush_Technology)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Bowl_Split), component.Sink_Bowl_Split, component.GetDisplayName(nameof(component.Sink_Bowl_Split)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.MAP_Performance_Rating), component.MAP_Performance_Rating, component.GetDisplayName(nameof(component.MAP_Performance_Rating)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bowl_Height_Without_Seat), component.Bowl_Height_Without_Seat, component.GetDisplayName(nameof(component.Bowl_Height_Without_Seat)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Shower_Door_Height), component.Tub_Shower_Door_Height, component.GetDisplayName(nameof(component.Tub_Shower_Door_Height)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Shower_Door_Opening_Width_Max), component.Tub_Shower_Door_Opening_Width_Max, component.GetDisplayName(nameof(component.Tub_Shower_Door_Opening_Width_Max)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Shower_Door_Opening_Width_Min), component.Tub_Shower_Door_Opening_Width_Min, component.GetDisplayName(nameof(component.Tub_Shower_Door_Opening_Width_Min)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Flush_Valve_Size), component.Flush_Valve_Size, component.GetDisplayName(nameof(component.Flush_Valve_Size)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Operating_Pressure_Flushing), component.Operating_Pressure_Flushing, component.GetDisplayName(nameof(component.Operating_Pressure_Flushing)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Rough_In_Size), component.Rough_In_Size, component.GetDisplayName(nameof(component.Rough_In_Size)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Toilet_Bowl_Height_With_Seat), component.Toilet_Bowl_Height_With_Seat, component.GetDisplayName(nameof(component.Toilet_Bowl_Height_With_Seat)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Toilet_Trapway_Diameter), component.Toilet_Trapway_Diameter, component.GetDisplayName(nameof(component.Toilet_Trapway_Diameter)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Battery_Weight), component.Battery_Weight, component.GetDisplayName(nameof(component.Battery_Weight)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bidet_No_Of_Heat_Settings), component.Bidet_No_Of_Heat_Settings, component.GetDisplayName(nameof(component.Bidet_No_Of_Heat_Settings)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Chemical_Composition_Of_Battery), component.Chemical_Composition_Of_Battery, component.GetDisplayName(nameof(component.Chemical_Composition_Of_Battery)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Toilet_Seat_Bolt_Spread), component.Toilet_Seat_Bolt_Spread, component.GetDisplayName(nameof(component.Toilet_Seat_Bolt_Spread)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Escutcheon_Internal_Diameter), component.Escutcheon_Internal_Diameter, component.GetDisplayName(nameof(component.Escutcheon_Internal_Diameter)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Number_Input_Valves_Connection), component.Number_Input_Valves_Connection, component.GetDisplayName(nameof(component.Number_Input_Valves_Connection)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_Weight_Capacity), component.Bath_Accessory_Weight_Capacity, component.GetDisplayName(nameof(component.Bath_Accessory_Weight_Capacity)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bristle_Stiffness), component.Bristle_Stiffness, component.GetDisplayName(nameof(component.Bristle_Stiffness)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bristle_Length), component.Bristle_Length, component.GetDisplayName(nameof(component.Bristle_Length)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Arm_Reach), component.Shower_Arm_Reach, component.GetDisplayName(nameof(component.Shower_Arm_Reach)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Wall_Bar_Length), component.Shower_Wall_Bar_Length, component.GetDisplayName(nameof(component.Shower_Wall_Bar_Length)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Concealed_Or_Exposed_Flush_Valve), component.Concealed_Or_Exposed_Flush_Valve, component.GetDisplayName(nameof(component.Concealed_Or_Exposed_Flush_Valve)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Assembly_Required_YN), component.Assembly_Required_YN, component.GetDisplayName(nameof(component.Assembly_Required_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_Installation_Type), component.Bath_Accessory_Installation_Type, component.GetDisplayName(nameof(component.Bath_Accessory_Installation_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Shower_Diameter), component.Bath_Shower_Diameter, component.GetDisplayName(nameof(component.Bath_Shower_Diameter)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Shower_Maximum_Deck_Thickness), component.Bath_Shower_Maximum_Deck_Thickness, component.GetDisplayName(nameof(component.Bath_Shower_Maximum_Deck_Thickness)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Shower_Showerhead_Face_Diameter), component.Bath_Shower_Showerhead_Face_Diameter, component.GetDisplayName(nameof(component.Bath_Shower_Showerhead_Face_Diameter)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Shower_Sprayer_Face_Diameter), component.Bath_Shower_Sprayer_Face_Diameter, component.GetDisplayName(nameof(component.Bath_Shower_Sprayer_Face_Diameter)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Batteries_Included_YN), component.Batteries_Included_YN, component.GetDisplayName(nameof(component.Batteries_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Compliant_Product_Substitute), component.Compliant_Product_Substitute, component.GetDisplayName(nameof(component.Compliant_Product_Substitute)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.EA_Each_Weight), component.EA_Each_Weight, component.GetDisplayName(nameof(component.EA_Each_Weight)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Faucet_Hole_Spacing), component.Faucet_Hole_Spacing, component.GetDisplayName(nameof(component.Faucet_Hole_Spacing)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Wall_Bar_Installation), component.Shower_Wall_Bar_Installation, component.GetDisplayName(nameof(component.Shower_Wall_Bar_Installation)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Interior_Shape), component.Tub_Interior_Shape, component.GetDisplayName(nameof(component.Tub_Interior_Shape)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Voltage), component.Tub_Voltage, component.GetDisplayName(nameof(component.Tub_Voltage)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Valve_Application_YN), component.Valve_Application_YN, component.GetDisplayName(nameof(component.Valve_Application_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Valve_Indoor_Outdoor), component.Valve_Indoor_Outdoor, component.GetDisplayName(nameof(component.Valve_Indoor_Outdoor)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Valve_Input_Diameter), component.Valve_Input_Diameter, component.GetDisplayName(nameof(component.Valve_Input_Diameter)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Valve_Output_Diameter), component.Valve_Output_Diameter, component.GetDisplayName(nameof(component.Valve_Output_Diameter)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Valves_Maximum_Pressure), component.Valves_Maximum_Pressure, component.GetDisplayName(nameof(component.Valves_Maximum_Pressure)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Valves_Maximum_Working_Temperature), component.Valves_Maximum_Working_Temperature, component.GetDisplayName(nameof(component.Valves_Maximum_Working_Temperature)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Volume_Control_YN), component.Volume_Control_YN, component.GetDisplayName(nameof(component.Volume_Control_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Volume_SAP), component.Volume_SAP, component.GetDisplayName(nameof(component.Volume_SAP)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Weight_Capacity), component.Weight_Capacity, component.GetDisplayName(nameof(component.Weight_Capacity)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tank_Included_YN), component.Tank_Included_YN, component.GetDisplayName(nameof(component.Tank_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Rough_In_Valve_Features), component.Rough_In_Valve_Features, component.GetDisplayName(nameof(component.Rough_In_Valve_Features)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.ADA_YN), component.ADA_YN, component.GetDisplayName(nameof(component.ADA_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Barrier_Free), component.Barrier_Free, component.GetDisplayName(nameof(component.Barrier_Free)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Cal_Green_YN), component.Cal_Green_YN, component.GetDisplayName(nameof(component.Cal_Green_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.CEC_Certified_YN), component.CEC_Certified_YN, component.GetDisplayName(nameof(component.CEC_Certified_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Certification_UL), component.Certification_UL, component.GetDisplayName(nameof(component.Certification_UL)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Certification_NSF), component.Certification_NSF, component.GetDisplayName(nameof(component.Certification_NSF)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.EPA_Watersense_YN), component.EPA_Watersense_YN, component.GetDisplayName(nameof(component.EPA_Watersense_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Proposition_65_Disclosure_YN), component.Proposition_65_Disclosure_YN, component.GetDisplayName(nameof(component.Proposition_65_Disclosure_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Smoke_And_Flame_Compliant), component.Smoke_And_Flame_Compliant, component.GetDisplayName(nameof(component.Smoke_And_Flame_Compliant)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Certification_CAN_UL), component.Certification_CAN_UL, component.GetDisplayName(nameof(component.Certification_CAN_UL)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Massachusetts_Plumbing_Board_YN), component.Massachusetts_Plumbing_Board_YN, component.GetDisplayName(nameof(component.Massachusetts_Plumbing_Board_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Toilet_Seat_Length_Inside), component.Toilet_Seat_Length_Inside, component.GetDisplayName(nameof(component.Toilet_Seat_Length_Inside)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Toilet_Seat_Width_Inside), component.Toilet_Seat_Width_Inside, component.GetDisplayName(nameof(component.Toilet_Seat_Width_Inside)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Drain_Opening_Size), component.Tub_Drain_Opening_Size, component.GetDisplayName(nameof(component.Tub_Drain_Opening_Size)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Shower_Base_Threshold_Height), component.Tub_Shower_Base_Threshold_Height, component.GetDisplayName(nameof(component.Tub_Shower_Base_Threshold_Height)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Vanity_Cabinet_Depth), component.Vanity_Cabinet_Depth, component.GetDisplayName(nameof(component.Vanity_Cabinet_Depth)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Vanity_Cabinet_Height), component.Vanity_Cabinet_Height, component.GetDisplayName(nameof(component.Vanity_Cabinet_Height)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Vanity_Cabinet_Width), component.Vanity_Cabinet_Width, component.GetDisplayName(nameof(component.Vanity_Cabinet_Width)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Vanity_Assembled_Depth), component.Vanity_Assembled_Depth, component.GetDisplayName(nameof(component.Vanity_Assembled_Depth)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Vanity_Assembled_Height), component.Vanity_Assembled_Height, component.GetDisplayName(nameof(component.Vanity_Assembled_Height)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Vanity_Assembled_Weight), component.Vanity_Assembled_Weight, component.GetDisplayName(nameof(component.Vanity_Assembled_Weight)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Vanity_Assembled_Width), component.Vanity_Assembled_Width, component.GetDisplayName(nameof(component.Vanity_Assembled_Width)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Product_Height), component.Product_Height, component.GetDisplayName(nameof(component.Product_Height)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Product_Weight), component.Product_Weight, component.GetDisplayName(nameof(component.Product_Weight)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Product_Length), component.Product_Length, component.GetDisplayName(nameof(component.Product_Length)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Product_Width), component.Product_Width, component.GetDisplayName(nameof(component.Product_Width)));
            #endregion


            return(Task.FromResult(arg));
        }
예제 #10
0
        public override Task <EntityView> Run(EntityView arg, CommercePipelineExecutionContext context)
        {
            Condition.Requires(arg).IsNotNull($"{Name}: The argument cannot be null.");

            var request = this._viewCommander.CurrentEntityViewArgument(context.CommerceContext);

            var catalogViewsPolicy = context.GetPolicy <KnownCatalogViewsPolicy>();

            var sellableitemstiboattributesviewspolicy = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>();

            var isVariationView = request.ViewName.Equals(catalogViewsPolicy.Variant, StringComparison.OrdinalIgnoreCase);
            var isConnectView   = arg.Name.Equals(catalogViewsPolicy.ConnectSellableItem, StringComparison.OrdinalIgnoreCase);

            // Only proceed if the current entity is a sellable item
            if (!(request.Entity is Sitecore.Commerce.Plugin.Catalog.SellableItem))
            {
                return(Task.FromResult(arg));
            }

            // Make sure that we target the correct views
            if (string.IsNullOrEmpty(request.ViewName) ||
                !request.ViewName.Equals(catalogViewsPolicy.Master, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(catalogViewsPolicy.Details, StringComparison.OrdinalIgnoreCase) &&
                !request.ViewName.Equals(sellableitemstiboattributesviewspolicy.StyleSpecification, StringComparison.OrdinalIgnoreCase) &&
                !isVariationView &&
                !isConnectView)
            {
                return(Task.FromResult(arg));
            }

            var sellableItem = (Sitecore.Commerce.Plugin.Catalog.SellableItem)request.Entity;
            var targetView   = arg;
            StyleSpecification component;
            bool isEditView = false;

            // See if we are dealing with the base sellable item or one of its variations.
            var variationId = string.Empty;

            if (isVariationView && !string.IsNullOrEmpty(arg.ItemId))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <StyleSpecification>();
            }
            else if (!string.IsNullOrEmpty(arg.ItemId) && arg.VersionedItemId != ("-1"))
            {
                variationId = arg.ItemId;
                component   = sellableItem.GetVariation(variationId).GetComponent <StyleSpecification>();
            }
            else
            {
                component = sellableItem.GetComponent <StyleSpecification>(variationId);
            }


            #region 13. Style Specifications
            isEditView = !string.IsNullOrEmpty(arg.Action) && arg.Action.Equals(sellableitemstiboattributesviewspolicy.StyleSpecification, StringComparison.OrdinalIgnoreCase);
            if (!isEditView)
            {
                // Create a new view and add it to the current entity view.
                var view = new EntityView
                {
                    Name          = context.GetPolicy <SellableItemStiboAttributesViewsPolicy>().StyleSpecification,
                    DisplayName   = "Style Specifications",
                    EntityId      = arg.EntityId,
                    DisplayRank   = 12,
                    EntityVersion = arg.EntityVersion,
                    ItemId        = variationId,
                    Icon          = "piece",
                };

                arg.ChildViews.Add(view);
                targetView = view;
            }



            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Integral_Dish_Rack_YN), component.Sink_Integral_Dish_Rack_YN, component.GetDisplayName(nameof(component.Sink_Integral_Dish_Rack_YN)));


            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Drain_Included_YN), component.Drain_Included_YN, component.GetDisplayName(nameof(component.Drain_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Drain_Material), component.Drain_Material, component.GetDisplayName(nameof(component.Drain_Material)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Base_Threshold), component.Base_Threshold, component.GetDisplayName(nameof(component.Base_Threshold)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Door_Glass_Finish), component.Door_Glass_Finish, component.GetDisplayName(nameof(component.Door_Glass_Finish)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bristle_Material), component.Bristle_Material, component.GetDisplayName(nameof(component.Bristle_Material)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Deck_Plate_Included_YN), component.Deck_Plate_Included_YN, component.GetDisplayName(nameof(component.Deck_Plate_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Trim_Type), component.Shower_Trim_Type, component.GetDisplayName(nameof(component.Shower_Trim_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Valve_Type), component.Shower_Valve_Type, component.GetDisplayName(nameof(component.Shower_Valve_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Wall_Installation_Type), component.Shower_Wall_Installation_Type, component.GetDisplayName(nameof(component.Shower_Wall_Installation_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Showerhead_Included_YN), component.Showerhead_Included_YN, component.GetDisplayName(nameof(component.Showerhead_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Finish_Type), component.Sink_Finish_Type, component.GetDisplayName(nameof(component.Sink_Finish_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Shape), component.Sink_Shape, component.GetDisplayName(nameof(component.Sink_Shape)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Soap_Lotion_Dispenser_YN), component.Soap_Lotion_Dispenser_YN, component.GetDisplayName(nameof(component.Soap_Lotion_Dispenser_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Rack_Type), component.Sink_Rack_Type, component.GetDisplayName(nameof(component.Sink_Rack_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Vanity_Hardware_Finish_Family), component.Vanity_Hardware_Finish_Family, component.GetDisplayName(nameof(component.Vanity_Hardware_Finish_Family)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Water_Filter_Included_YN), component.Water_Filter_Included_YN, component.GetDisplayName(nameof(component.Water_Filter_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Spray_Pattern_List), component.Spray_Pattern_List, component.GetDisplayName(nameof(component.Spray_Pattern_List)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mirror_Frame_Material), component.Mirror_Frame_Material, component.GetDisplayName(nameof(component.Mirror_Frame_Material)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mirror_Framed_Or_Frameless), component.Mirror_Framed_Or_Frameless, component.GetDisplayName(nameof(component.Mirror_Framed_Or_Frameless)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mirror_Light_YN), component.Mirror_Light_YN, component.GetDisplayName(nameof(component.Mirror_Light_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mirror_Magnifying_YN), component.Mirror_Magnifying_YN, component.GetDisplayName(nameof(component.Mirror_Magnifying_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mirror_Shape), component.Mirror_Shape, component.GetDisplayName(nameof(component.Mirror_Shape)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mirror_Telescoping_YN), component.Mirror_Telescoping_YN, component.GetDisplayName(nameof(component.Mirror_Telescoping_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Mirror_Type), component.Mirror_Type, component.GetDisplayName(nameof(component.Mirror_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Product_Style), component.Product_Style, component.GetDisplayName(nameof(component.Product_Style)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Arm_Style), component.Shower_Arm_Style, component.GetDisplayName(nameof(component.Shower_Arm_Style)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Diverter_Type), component.Shower_Diverter_Type, component.GetDisplayName(nameof(component.Shower_Diverter_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_No_Of_Spray_Settings), component.Shower_No_Of_Spray_Settings, component.GetDisplayName(nameof(component.Shower_No_Of_Spray_Settings)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_No_Of_Jets), component.Shower_No_Of_Jets, component.GetDisplayName(nameof(component.Shower_No_Of_Jets)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Material), component.Fitting_Material, component.GetDisplayName(nameof(component.Fitting_Material)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Mount_Type), component.Fitting_Mount_Type, component.GetDisplayName(nameof(component.Fitting_Mount_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_No_Of_Handles), component.Fitting_No_Of_Handles, component.GetDisplayName(nameof(component.Fitting_No_Of_Handles)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Spout_Type), component.Fitting_Spout_Type, component.GetDisplayName(nameof(component.Fitting_Spout_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Hinge_Material), component.Hinge_Material, component.GetDisplayName(nameof(component.Hinge_Material)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fixture_Material), component.Fixture_Material, component.GetDisplayName(nameof(component.Fixture_Material)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Frame_Finish), component.Frame_Finish, component.GetDisplayName(nameof(component.Frame_Finish)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Hand_Head_Shower_Shape), component.Hand_Head_Shower_Shape, component.GetDisplayName(nameof(component.Hand_Head_Shower_Shape)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Handle_Finish), component.Handle_Finish, component.GetDisplayName(nameof(component.Handle_Finish)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Max_Occupants), component.Max_Occupants, component.GetDisplayName(nameof(component.Max_Occupants)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Flushing_Type), component.Flushing_Type, component.GetDisplayName(nameof(component.Flushing_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Door_Swing), component.Door_Swing, component.GetDisplayName(nameof(component.Door_Swing)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Wall_Number_Of_Shelves), component.Shower_Wall_Number_Of_Shelves, component.GetDisplayName(nameof(component.Shower_Wall_Number_Of_Shelves)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Handle_Style), component.Handle_Style, component.GetDisplayName(nameof(component.Handle_Style)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Jet_Type), component.Jet_Type, component.GetDisplayName(nameof(component.Jet_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Lighting), component.Tub_Lighting, component.GetDisplayName(nameof(component.Tub_Lighting)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Kitchen_Sink_Accessory_Grid_Features), component.Kitchen_Sink_Accessory_Grid_Features, component.GetDisplayName(nameof(component.Kitchen_Sink_Accessory_Grid_Features)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Accessory_Type), component.Sink_Accessory_Type, component.GetDisplayName(nameof(component.Sink_Accessory_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Exterior_Shape), component.Tub_Exterior_Shape, component.GetDisplayName(nameof(component.Tub_Exterior_Shape)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Features), component.Tub_Features, component.GetDisplayName(nameof(component.Tub_Features)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Product_Type), component.Tub_Product_Type, component.GetDisplayName(nameof(component.Tub_Product_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bowl_Included_YN), component.Bowl_Included_YN, component.GetDisplayName(nameof(component.Bowl_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Item_Shape), component.Item_Shape, component.GetDisplayName(nameof(component.Item_Shape)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Kitchen_Sink_Product_Type), component.Kitchen_Sink_Product_Type, component.GetDisplayName(nameof(component.Kitchen_Sink_Product_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Toilet_Activation_Lever_Location), component.Toilet_Activation_Lever_Location, component.GetDisplayName(nameof(component.Toilet_Activation_Lever_Location)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_Bath_Type), component.Sink_Bath_Type, component.GetDisplayName(nameof(component.Sink_Bath_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Sink_No_Of_Basins), component.Sink_No_Of_Basins, component.GetDisplayName(nameof(component.Sink_No_Of_Basins)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Trim_Kit_Included_YN), component.Trim_Kit_Included_YN, component.GetDisplayName(nameof(component.Trim_Kit_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Kitchen_Sink_Accessory_Rack_Type), component.Kitchen_Sink_Accessory_Rack_Type, component.GetDisplayName(nameof(component.Kitchen_Sink_Accessory_Rack_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Shower_Door_Fits_Opening_Height), component.Tub_Shower_Door_Fits_Opening_Height, component.GetDisplayName(nameof(component.Tub_Shower_Door_Fits_Opening_Height)));


            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Tub_Shower_Door_Glass_Thickness), component.Tub_Shower_Door_Glass_Thickness, component.GetDisplayName(nameof(component.Tub_Shower_Door_Glass_Thickness)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Door_Glass_Style), component.Door_Glass_Style, component.GetDisplayName(nameof(component.Door_Glass_Style)));


            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Door_Type), component.Door_Type, component.GetDisplayName(nameof(component.Door_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Frame_Type), component.Frame_Type, component.GetDisplayName(nameof(component.Frame_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Number_Of_Flush_Valves), component.Number_Of_Flush_Valves, component.GetDisplayName(nameof(component.Number_Of_Flush_Valves)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Rough_In_Valve_Included_YN), component.Rough_In_Valve_Included_YN, component.GetDisplayName(nameof(component.Rough_In_Valve_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bidet_Slow_Close_Lid_YN), component.Bidet_Slow_Close_Lid_YN, component.GetDisplayName(nameof(component.Bidet_Slow_Close_Lid_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_Hanger_Type), component.Bath_Accessory_Hanger_Type, component.GetDisplayName(nameof(component.Bath_Accessory_Hanger_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_Hardware_Included_YN), component.Bath_Accessory_Hardware_Included_YN, component.GetDisplayName(nameof(component.Bath_Accessory_Hardware_Included_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_Holder_Type), component.Bath_Accessory_Holder_Type, component.GetDisplayName(nameof(component.Bath_Accessory_Holder_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_Hook_Type), component.Bath_Accessory_Hook_Type, component.GetDisplayName(nameof(component.Bath_Accessory_Hook_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_Mount_Type), component.Bath_Accessory_Mount_Type, component.GetDisplayName(nameof(component.Bath_Accessory_Mount_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_Mounting_Hardware_YN), component.Bath_Accessory_Mounting_Hardware_YN, component.GetDisplayName(nameof(component.Bath_Accessory_Mounting_Hardware_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_No_Of_Bars), component.Bath_Accessory_No_Of_Bars, component.GetDisplayName(nameof(component.Bath_Accessory_No_Of_Bars)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_No_Of_Chambers), component.Bath_Accessory_No_Of_Chambers, component.GetDisplayName(nameof(component.Bath_Accessory_No_Of_Chambers)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_No_Of_Hangers), component.Bath_Accessory_No_Of_Hangers, component.GetDisplayName(nameof(component.Bath_Accessory_No_Of_Hangers)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_No_Of_Pieces), component.Bath_Accessory_No_Of_Pieces, component.GetDisplayName(nameof(component.Bath_Accessory_No_Of_Pieces)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_No_Of_Hooks), component.Bath_Accessory_No_Of_Hooks, component.GetDisplayName(nameof(component.Bath_Accessory_No_Of_Hooks)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_Product_Type), component.Bath_Accessory_Product_Type, component.GetDisplayName(nameof(component.Bath_Accessory_Product_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_Textured_Grip_YN), component.Bath_Accessory_Textured_Grip_YN, component.GetDisplayName(nameof(component.Bath_Accessory_Textured_Grip_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Bath_Accessory_Type), component.Bath_Accessory_Type, component.GetDisplayName(nameof(component.Bath_Accessory_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Corrosion_Resistant_YN), component.Shower_Corrosion_Resistant_YN, component.GetDisplayName(nameof(component.Shower_Corrosion_Resistant_YN)));


            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Temperature_Control_YN), component.Temperature_Control_YN, component.GetDisplayName(nameof(component.Temperature_Control_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Side_Spray_YN), component.Side_Spray_YN, component.GetDisplayName(nameof(component.Side_Spray_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Touchless_Touch_On), component.Fitting_Touchless_Touch_On, component.GetDisplayName(nameof(component.Fitting_Touchless_Touch_On)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Foot_Operation_YN), component.Foot_Operation_YN, component.GetDisplayName(nameof(component.Foot_Operation_YN)));

            //AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Fitting_Features), component.Fitting_Features, component.GetDisplayName(nameof(component.Fitting_Features)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Pull_Down_YN), component.Pull_Down_YN, component.GetDisplayName(nameof(component.Pull_Down_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Water_Efficient_YN), component.Water_Efficient_YN, component.GetDisplayName(nameof(component.Water_Efficient_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Drininking_Chilled_Water_YN), component.Drininking_Chilled_Water_YN, component.GetDisplayName(nameof(component.Drininking_Chilled_Water_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Drinking_Hot_Water_YN), component.Drinking_Hot_Water_YN, component.GetDisplayName(nameof(component.Drinking_Hot_Water_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Drinking_Water_Dispenser_YN), component.Drinking_Water_Dispenser_YN, component.GetDisplayName(nameof(component.Drinking_Water_Dispenser_YN)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Wall_Type), component.Shower_Wall_Type, component.GetDisplayName(nameof(component.Shower_Wall_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_Bath_Product_Type), component.Shower_Bath_Product_Type, component.GetDisplayName(nameof(component.Shower_Bath_Product_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Valve_Type), component.Valve_Type, component.GetDisplayName(nameof(component.Valve_Type)));

            AddSellableItemProperties.AddPropertiesToViewWithSection(targetView, component, Models.ProductContsants.NonEditableField, nameof(component.Shower_System_Product_Type), component.Shower_System_Product_Type, component.GetDisplayName(nameof(component.Shower_System_Product_Type)));

            #endregion


            return(Task.FromResult(arg));
        }