I need to add up all orders of a certant status when getting data from productvariant.cs.. I know I can handle this in Nop.Services but is there a way to access this directly from productvariant.cs in Nop.Core?
Basically what im doing is changing the "get" for StockQuantity so if the product variant is of a certant ManageInventoryMethod, I get the qty from our backend system(got this covered) and then subtract all the OrderProductVariants where the order status is not complete..
The problem is suppose there is a service that returns a list of OrderProductVariants.. In the method that uses the OrderProductVariants it uses OrderProductVariant.ProductVariant.StockQuantity.. I wouldnt be able to change the value of StockQuantity to my "computed value"..
Ok, how about this. You run a scheduled process every N hours to refresh the StockQuantity for those items to what your Back Office process says + open orders. You could possibly be off by a few but at least the data is only a few hours old.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.