0
我正在使用noncommerce V2.6。 所以我嘗試在管理面板中添加新產品。 我輸入所有數據,然後單擊保存按鈕或保存並繼續編輯按鈕。如何在nopcommerce中添加產品?
我有這樣的錯誤。
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 546: //default product variant
Line 547: var variant = model.FirstProductVariantModel.ToEntity();
Line 548: variant.ProductId = product.Id;
Line 549: variant.Published = true;
Line 550: variant.DisplayOrder = 1;
我的代碼是低於有錯誤..
var variant = model.FirstProductVariantModel.ToEntity();
variant.ProductId = product.Id;
variant.Published = true;
variant.DisplayOrder = 1;
variant.CreatedOnUtc = DateTime.UtcNow;
variant.UpdatedOnUtc = DateTime.UtcNow;
_productService.InsertProductVariant(variant);
FirstVariant_UpdateLocales(variant, model.FirstProductVariantModel);
我怎樣才能解決售後服務吧..
plz幫助... Thankx