Merge branch '4.80' of https://git.aycode.com/Adam/Mango.Nop.Plugins into 4.80
This commit is contained in:
commit
610c3963f0
|
|
@ -595,7 +595,7 @@ Output: [{""product"":""szőlő"",""quantity"":50}]";
|
|||
var products = await _productService.SearchProductsAsync(
|
||||
keywords: parsed.Product,
|
||||
pageIndex: 0,
|
||||
pageSize: 20); // Get up to 20 matches
|
||||
pageSize: 50); // Get up to 20 matches
|
||||
|
||||
if (!products.Any())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -377,10 +377,16 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Controllers
|
|||
|
||||
await ctx.ShippingDocuments.InsertAsync(shippingDocument);
|
||||
|
||||
foreach (var item in shippingDocument.ShippingItems)
|
||||
if(shippingDocument.ShippingItems != null)
|
||||
{
|
||||
var product = await ctx.Products.GetByIdAsync(item.ProductId);
|
||||
product.ProductCost = Convert.ToDecimal(item.UnitPriceOnDocument);
|
||||
foreach (var item in shippingDocument.ShippingItems)
|
||||
{
|
||||
var product = await ctx.Products.GetByIdAsync(item.ProductId);
|
||||
if(product != null)
|
||||
{
|
||||
product.ProductCost = Convert.ToDecimal(item.UnitPriceOnDocument);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return await ctx.ShippingDocuments.GetByIdAsync(shippingDocument.Id, shippingDocument.Shipping != null || shippingDocument.Partner != null);
|
||||
|
|
|
|||
Loading…
Reference in New Issue