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
user
User- The 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
user
User- The current user
productId
string- The product identifier
variantId
string- The 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
user
User- The current user
favoriteListId
int- The identifier of a favorite list
productId
string- The 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
user
User- The current user
favoriteListId
intproductId
string- The product identifier
variantId
string- The product variant identifier