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(
|
var products = await _productService.SearchProductsAsync(
|
||||||
keywords: parsed.Product,
|
keywords: parsed.Product,
|
||||||
pageIndex: 0,
|
pageIndex: 0,
|
||||||
pageSize: 20); // Get up to 20 matches
|
pageSize: 50); // Get up to 20 matches
|
||||||
|
|
||||||
if (!products.Any())
|
if (!products.Any())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -377,10 +377,16 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Controllers
|
||||||
|
|
||||||
await ctx.ShippingDocuments.InsertAsync(shippingDocument);
|
await ctx.ShippingDocuments.InsertAsync(shippingDocument);
|
||||||
|
|
||||||
foreach (var item in shippingDocument.ShippingItems)
|
if(shippingDocument.ShippingItems != null)
|
||||||
{
|
{
|
||||||
var product = await ctx.Products.GetByIdAsync(item.ProductId);
|
foreach (var item in shippingDocument.ShippingItems)
|
||||||
product.ProductCost = Convert.ToDecimal(item.UnitPriceOnDocument);
|
{
|
||||||
|
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);
|
return await ctx.ShippingDocuments.GetByIdAsync(shippingDocument.Id, shippingDocument.Shipping != null || shippingDocument.Partner != null);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue