Compare commits

..

No commits in common. "9cb032db3d7395113d5ee789f90c4bd975f343a9" and "a261318005ddca9f7fe1693f9dbdebcac2539c73" have entirely different histories.

1 changed files with 3 additions and 4 deletions

View File

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