Can I add a field to the Bulk Edit Products Page? I want to edit all of the products that we sell with their weights - can I add Weight as a field to the Bulk Edit Products Page as this will make my job a lot easier?
Thanks.
var productModel = new BulkEditProductModel
{
Id = x.Id,
Name = x.Name,
Sku = x.Sku,
Weight = x.Weight,
OldPrice = x.OldPrice,
Price = x.Price,
ManageInventoryMethod = x.ManageInventoryMethod.GetLocalizedEnum(_localizationService, _workContext.WorkingLanguage.Id),
StockQuantity = x.StockQuantity,
Published = x.Published
};
product.Name = pModel.Name;
product.Sku = pModel.Sku;
product.Weight = pModel.Weight;
product.Price = pModel.Price;
product.OldPrice = pModel.OldPrice;
product.StockQuantity = pModel.StockQuantity;
product.Published = pModel.Published;
product.UpdatedOnUtc = DateTime.UtcNow;
_productService.UpdateProduct(product);
Weight: { editable: true, type: "number" },
{
field: "Weight",
title: "@T("Admin.Catalog.Products.Fields.Weight")",
width: 150,
editor: function (container, options) {
$('<input name="' + options.field + '"/>')
.appendTo(container)
.kendoNumericTextBox({
format: "{0:n4}",
decimals: 4
});
}
},