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
favoriteListId
intThe favorite list identifier.
productId
stringThe product identifier.
variantId
stringThe product variant identifier.
Delete(int)
Deletes the object with specified Id.
public override void Delete(int id)
Parameters
id
intSpecified Id.
Fill(IDataReader)
Fills the specified reader.
public override void Fill(IDataReader reader)
Parameters
reader
IDataReaderThe reader.
FillRow(DataRow)
Fills the row.
protected override void FillRow(DataRow row)
Parameters
row
DataRowThe 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
id
intThe id of favorites list.
startIndex
intThe start index of range.
pageSize
intThe 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
favoriteProductId
intThe 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
listId
intThe favorite list Id.
productId
stringThe id of the product.
productVariantId
stringThe 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
productIds
IEnumerable<string>The ids of the favorite products.
Returns
GetProductsByListId(int)
Gets products by favorites list id.
public static IEnumerable<CustomerProductListProduct> GetProductsByListId(int id)
Parameters
id
intThe 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
publishedId
stringThe 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
userId
intThe 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
UserId
intThe id of user.
useCustomerNumberToRetrieveListsProducts
boolIf 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
product
ProductThe product.
Returns
- bool
true
if 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
true
if 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
productId
stringThe product identifier.
variantId
stringThe product variant identifier.
favoriteListId
intThe favorite list identifier.
quantity
intThe quantity.
UpdateSortOrder(ref string, int, int)
Updates the sort order.
public static void UpdateSortOrder(ref string productId, int favoriteListId, int sortOrder)
Parameters
productId
stringThe product identifier.
favoriteListId
intThe favorite list identifier.
sortOrder
intThe sort order.