Skip to content

Commit

Permalink
#7206 Fixed auto adding required products when the RequireOtherProduc…
Browse files Browse the repository at this point in the history
…ts is disabled
  • Loading branch information
exileDev committed May 27, 2024
1 parent 36ff3e4 commit 6455b0c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Libraries/Nop.Services/Orders/ShoppingCartService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1688,6 +1688,9 @@ public virtual async Task<IList<Product>> GetProductsRequiringProductAsync(IList

async Task addRequiredProductsToCartAsync(int qty = 0)
{
if (!product.RequireOtherProducts)
return;

//get these required products
var requiredProducts = await _productService.GetProductsByIdsAsync(_productService.ParseRequiredProductIds(product));
if (!requiredProducts.Any())
Expand Down

0 comments on commit 6455b0c

Please sign in to comment.