Class CustomerProductListProduct
- Namespace
- Dynamicweb.Ecommerce.CustomerCenter
- Assembly
- Dynamicweb.Ecommerce.dll
CustomerProductListProduct class.
public class CustomerProductListProduct : DbObject
- Inheritance
-
CustomerProductListProduct
- Inherited Members
Constructors
CustomerProductListProduct()
Initializes a new instance of the CustomerProductListProduct class.
public CustomerProductListProduct()
Properties
ListId
Gets or sets the list identifier.
public int ListId { get; set; }
Property Value
- int
The list identifier.
Note
Gets or sets the note.
public string? Note { get; set; }
Property Value
- string
The note.
ProductId
Gets or sets the product identifier.
public string ProductId { get; set; }
Property Value
- string
The product identifier.
ProductReferenceUrl
Gets or sets the product reference URL.
public string ProductReferenceUrl { get; set; }
Property Value
- string
The product reference URL.
ProductVariantId
Gets or sets the product variant identifier.
public string ProductVariantId { get; set; }
Property Value
- string
The product variant identifier.
Quantity
Gets or sets the quantity.
public int Quantity { get; set; }
Property Value
- int
The quantity.
SortOrder
Gets or sets the sort order.
public int SortOrder { get; set; }
Property Value
- int
The sort order.
Methods
ClearCache(int, string, string)
Clears the cache.
public static void ClearCache(int favoriteListId, string productId, string variantId)
Parameters
favoriteListIdintThe favorite list identifier.
productIdstringThe product identifier.
variantIdstringThe product variant identifier.
Delete(int)
Deletes the object with specified Id.
public override void Delete(int id)
Parameters
idintSpecified Id.
Fill(IDataReader)
Fills the specified reader.
public override void Fill(IDataReader reader)
Parameters
readerIDataReaderThe reader.
FillRow(DataRow)
Fills the row.
protected override void FillRow(DataRow row)
Parameters
rowDataRowThe row.
GetPagedProductsByListId(int, int, int)
Gets range of products by favorites list id.
public static IEnumerable<CustomerProductListProduct> GetPagedProductsByListId(int id, int startIndex, int pageSize)
Parameters
idintThe id of favorites list.
startIndexintThe start index of range.
pageSizeintThe ammount of items.
Returns
- IEnumerable<CustomerProductListProduct>
The range of products in favorites list
GetProductById(int)
Gets product by id.
public static CustomerProductListProduct? GetProductById(int favoriteProductId)
Parameters
favoriteProductIdintThe id of the favorite product.
Returns
GetProductById(string, string)
Gets product by id.
public static CustomerProductListProduct? GetProductById(string productId, string productVariantId)
Parameters
Returns
GetProductByIdAndList(int, string, string)
Gets product by id and favorite list Id.
public static CustomerProductListProduct? GetProductByIdAndList(int listId, string productId, string productVariantId)
Parameters
listIdintThe favorite list Id.
productIdstringThe id of the product.
productVariantIdstringThe variant id of the product.
Returns
- CustomerProductListProduct
The favorite product
GetProductsByIds(IEnumerable<string>)
Gets products by ids.
public static IEnumerable<CustomerProductListProduct> GetProductsByIds(IEnumerable<string> productIds)
Parameters
productIdsIEnumerable<string>The ids of the favorite products.
Returns
GetProductsByListId(int)
Gets products by favorites list id.
public static IEnumerable<CustomerProductListProduct> GetProductsByListId(int id)
Parameters
idintThe id of favorites list.
Returns
- IEnumerable<CustomerProductListProduct>
The products in favorites list
GetProductsByListPublishedId(string)
Gets products by favorites list published id.
public static IEnumerable<CustomerProductListProduct> GetProductsByListPublishedId(string publishedId)
Parameters
publishedIdstringThe published id of favorites list.
Returns
- IEnumerable<CustomerProductListProduct>
The products in favorites list
GetProductsByUserId(int)
Gets favorites products by user id.
public static IEnumerable<CustomerProductListProduct> GetProductsByUserId(int userId)
Parameters
userIdintThe id of user.
Returns
- IEnumerable<CustomerProductListProduct>
The products in favorites list
GetProductsByUserId(int, bool)
Gets favorites products by user id.
public static IEnumerable<CustomerProductListProduct> GetProductsByUserId(int UserId, bool useCustomerNumberToRetrieveListsProducts)
Parameters
UserIdintThe id of user.
useCustomerNumberToRetrieveListsProductsboolIf True returns products for all all users with with current user customer number
Returns
- IEnumerable<CustomerProductListProduct>
The products in favorites list
IsProductInFavorites(Product)
Gets value which indicate whether product is in any favorite list.
public static bool IsProductInFavorites(Product product)
Parameters
productProductThe product.
Returns
- bool
trueif product is in any favorite list; otherwise,false.
IsProductInFavorites(Product, int)
Gets value which indicate whether product is in the favorite list.
public static bool IsProductInFavorites(Product product, int listId)
Parameters
Returns
- bool
trueif product is in the favorite list; otherwise,false.
Save()
Saves current data to the database.
public override void Save()
UpdateQuantity(string, string, int, int)
Updates the quantity.
public static void UpdateQuantity(string productId, string variantId, int favoriteListId, int quantity)
Parameters
productIdstringThe product identifier.
variantIdstringThe product variant identifier.
favoriteListIdintThe favorite list identifier.
quantityintThe quantity.
UpdateSortOrder(ref string, int, int)
Updates the sort order.
public static void UpdateSortOrder(ref string productId, int favoriteListId, int sortOrder)
Parameters
productIdstringThe product identifier.
favoriteListIdintThe favorite list identifier.
sortOrderintThe sort order.