You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe there is a bug in the ProductCopyService.CopyAttributesMappingAsync method at the call to _productService.AddStockQuantityHistoryEntryAsync on lines 371-373.
The combinationId parameter receives combination.Id, but I believe that combinationCopy.Id would be more appropriate. Currently, the resulting entry in the StockQuantityHistory table references the product copy's id but the original comination's id and this causes issues when trying to reconcile inventory history for products with attribute combinations.
I would also argue there's a valid use case for wanting to copy a product and attribute combinations without copying any inventory information but that's a separate issue.
The text was updated successfully, but these errors were encountered:
You are absolutely right. This issue also causes an exception error when copying products with attribute combinations. I have also fixed two other parameter issues in the AddStockQuantityHistoryEntryAsync method call. I have just created an equivalent pull request for this.
parshan2
added a commit
to parshan2/nopCommerce
that referenced
this issue
May 26, 2024
I believe there is a bug in the
ProductCopyService.CopyAttributesMappingAsync
method at the call to_productService.AddStockQuantityHistoryEntryAsync
on lines 371-373.The
combinationId
parameter receivescombination.Id
, but I believe thatcombinationCopy.Id
would be more appropriate. Currently, the resulting entry in theStockQuantityHistory
table references the product copy's id but the original comination's id and this causes issues when trying to reconcile inventory history for products with attribute combinations.nopCommerce/src/Libraries/Nop.Services/Catalog/CopyProductService.cs
Lines 341 to 373 in 98adab9
I would also argue there's a valid use case for wanting to copy a product and attribute combinations without copying any inventory information but that's a separate issue.
The text was updated successfully, but these errors were encountered: