Customizing Stock Quantity History Message to Display Custom Order ID in nopCommerce 4.2 Product Edit Page

2 周 前
nopcommerce 4.2.   how can i update Stock quantity history's message order ID to CustomOrderId from Product Edit page?


Example
The stock quantity has been reduced by placing the order #19
to
The stock quantity has been reduced by placing the order #PP19(customerOrderNumber)
2 周 前
You would need to customise the solution
See the routine MoveShoppingCartItemsToOrderItemsAsync(PlaceOrderContainer details, Order order)
and the code
            //inventory
            await _productService.AdjustInventoryAsync(product, -sc.Quantity, sc.AttributesXml,
                string.Format(await _localizationService.GetResourceAsync("Admin.StockQuantityHistory.Messages.PlaceOrder"), order.Id));

in the file

https://github.com/nopSolutions/nopCommerce/blob/develop/src/Libraries/Nop.Services/Orders/OrderProcessingService.cs