This commit is contained in:
Loretta 2025-10-21 15:30:54 +02:00
commit 7f0844fb17
1 changed files with 4 additions and 3 deletions

View File

@ -178,7 +178,7 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Areas.Admin.Controllers
var order = new Order var order = new Order
{ {
OrderGuid = Guid.NewGuid(), OrderGuid = Guid.NewGuid(),
CustomOrderNumber = null, CustomOrderNumber = "",
CustomerId = customerId, CustomerId = customerId,
CustomerLanguageId = customer.LanguageId ?? 1, CustomerLanguageId = customer.LanguageId ?? 1,
CustomerTaxDisplayType = TaxDisplayType.IncludingTax, CustomerTaxDisplayType = TaxDisplayType.IncludingTax,
@ -196,7 +196,8 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Areas.Admin.Controllers
var transactionSuccess = await _dbContext.TransactionSafeAsync(async _ => var transactionSuccess = await _dbContext.TransactionSafeAsync(async _ =>
{ {
await _orderService.InsertOrderAsync(order); await _orderService.InsertOrderAsync(order);
order.CustomOrderNumber = order.Id.ToString();
await _orderService.UpdateOrderAsync(order);
foreach (var item in orderProducts) foreach (var item in orderProducts)
{ {
//var product = await _productService.GetProductByIdAsync(item.Id); //var product = await _productService.GetProductByIdAsync(item.Id);