Override view: Areas/Admin/Views/Product/_CreateOrUpdate.SpecificationAttributes.cshtml

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 4 años
I would like to override the following view  Areas/Admin/Views/Product/_CreateOrUpdate.SpecificationAttributes.cshtml as follow:

Remove this column:
//new ColumnProperty(nameof(ProductSpecificationAttributeModel.ValueRaw))
//{
//    Title = T("Admin.Catalog.Products.SpecificationAttributes.Fields.Value").Text,
//    Width = "200",
//    Encode = false
//},

I am using 4.2. What are the necessary steps? Is there a sample?
Thankx, Harry
Hace 4 años
Check this example to override admin view.
Hace 4 años
Thankx Jaber! I already saw that post and have tried to implement it. But I get the following errors:

AspNetCore.Areas_Admin_Views_Product__CreateOrUpdate.ExecuteAsync.AnonymousMethod__9() in _CreateOrUpdate.cshtml

System.AggregateException: 'One or more errors occurred. (One or more compilation failures occurred:

2upql0h1.3ju(17,175): error CS0246: The type or namespace name 'ProductModel' could not be found (are you missing a using directive or an assembly reference?)

...\Areas\Admin\Views\Product\_CreateOrUpdate.SpecificationAttributes.cshtml(5,10): error CS0103: The name 'T' does not exist in the current context

...\Areas\Admin\Views\Product\_CreateOrUpdate.SpecificationAttributes.cshtml(14,59): error CS0246: The type or namespace name 'DataTablesModel' could not be found (are you missing a using directive or an assembly reference?)

...\Areas\Admin\Views\Product\_CreateOrUpdate.SpecificationAttributes.cshtml(17,34): error CS0246: The type or namespace name 'DataUrl' could not be found (are you missing a using directive or an assembly reference?)
Hace 4 años
Copy _ViewImports.cshtml from Admin views folder and paste it in your plugin view folder.

You will find lot of references there. You can remove all admin model related references except Catalog.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.