Skip to content

Commit f9fc713

Browse files
committed
Merge branch '4.90-bug-fixes' into develop
2 parents 5a83dde + a0eddec commit f9fc713

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/Libraries/Nop.Services/Orders/NopOrderDefaults.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ public static partial class NopOrderDefaults
3434
/// {3} : product ID
3535
/// {4} : created from date
3636
/// {5} : created to date
37+
/// {6} : custom wishlist ID
3738
/// </remarks>
38-
public static CacheKey ShoppingCartItemsAllCacheKey => new("Nop.shoppingcartitem.all.{0}-{1}-{2}-{3}-{4}-{5}");
39+
public static CacheKey ShoppingCartItemsAllCacheKey => new("Nop.shoppingcartitem.all.{0}-{1}-{2}-{3}-{4}-{5}-{6}");
3940

4041
/// <summary>
4142
/// Gets a key pattern to clear cache
@@ -45,7 +46,6 @@ public static partial class NopOrderDefaults
4546
/// </remarks>
4647
public static string ShoppingCartItemsByCustomerPrefix => "Nop.shoppingcartitem.all.{0}";
4748

48-
4949
#endregion
5050

5151
#region Perform order with lock

src/Libraries/Nop.Services/Orders/ShoppingCartService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ public virtual async Task<IList<ShoppingCartItem>> GetShoppingCartAsync(Customer
776776
if (createdToUtc.HasValue)
777777
items = items.Where(item => createdToUtc.Value >= item.CreatedOnUtc);
778778

779-
return await _shortTermCacheManager.GetAsync(async () => await items.ToListAsync(), NopOrderDefaults.ShoppingCartItemsAllCacheKey, customer, shoppingCartType, storeId, productId, createdFromUtc, createdToUtc);
779+
return await _shortTermCacheManager.GetAsync(async () => await items.ToListAsync(), NopOrderDefaults.ShoppingCartItemsAllCacheKey, customer, shoppingCartType, storeId, productId, createdFromUtc, createdToUtc, customWishlistId);
780780
}
781781

782782
/// <summary>

src/Presentation/Nop.Web/Factories/CommonModelFactory.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,13 +347,14 @@ public virtual async Task<HeaderLinksModel> PrepareHeaderLinksModelAsync()
347347
UnreadPrivateMessages = unreadMessage,
348348
AlertMessage = alertMessage,
349349
};
350+
350351
//performance optimization (use "HasShoppingCartItems" property)
351352
if (customer.HasShoppingCartItems)
352353
{
353354
model.ShoppingCartItems = (await _shoppingCartService.GetShoppingCartAsync(customer, ShoppingCartType.ShoppingCart, store.Id))
354355
.Sum(item => item.Quantity);
355356

356-
model.WishlistItems = (await _shoppingCartService.GetShoppingCartAsync(customer, ShoppingCartType.Wishlist, store.Id))
357+
model.WishlistItems = (await _shoppingCartService.GetShoppingCartAsync(customer, ShoppingCartType.Wishlist, store.Id, customWishlistId: 0))
357358
.Sum(item => item.Quantity);
358359
}
359360

0 commit comments

Comments
 (0)