Class UserExtensions
- Assembly
- Dynamicweb.Ecommerce.dll
The class UserExtensions represents shared member providing user extensions.
public static class UserExtensions
- Inheritance
-
UserExtensions
- Inherited Members
Methods
GetFavoriteListById(User, int)
Gets a FavoriteList with specified identifier if it belonging to the current user />
public static FavoriteList? GetFavoriteListById(this User user, int favoriteListId)
Parameters
Returns
Remarks
Returns the null value if favorite list doesn't belong to current user.
GetFavoriteLists(User)
Gets a IEnumerable<T> of all FavoriteLists belonging to the current user />
public static IEnumerable<FavoriteList> GetFavoriteLists(this User user)
Parameters
userUserThe current user
Returns
IsProductInAnyFavoriteList(User, string)
Checks if the provided ProductId exists in any of the favorite lists, which belongs to the current user. This means that it checks for both master And variants in all the favorite lists.
public static bool IsProductInAnyFavoriteList(this User user, string productId)
Parameters
Returns
IsProductInAnyFavoriteList(User, string, string)
Checks if the specific variant (Or master if the variantId Is empty), exists in any favorite list, which belongs to the current user.
public static bool IsProductInAnyFavoriteList(this User user, string productId, string variantId)
Parameters
userUserThe current user
productIdstringThe product identifier
variantIdstringThe product variant identifier
Returns
IsProductInFavoriteList(User, int, string)
Checks if the provided ProductId exists in the favorite list, which matches the FavoriteListId. This means that it checks for both master And variants in all the favorite lists.
public static bool IsProductInFavoriteList(this User user, int favoriteListId, string productId)
Parameters
userUserThe current user
favoriteListIdintThe identifier of a favorite list
productIdstringThe product identifier
Returns
IsProductInFavoriteList(User, int, string, string)
Checks if the specific variant (Or master if the variantId Is empty) exists in the favorite list, which matches the FavoriteListId.
public static bool IsProductInFavoriteList(this User user, int favoriteListId, string productId, string variantId)
Parameters
userUserThe current user
favoriteListIdintproductIdstringThe product identifier
variantIdstringThe product variant identifier