Table of Contents

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 int

The favorite list identifier.

productId string

The product identifier.

variantId string

The product variant identifier.

Delete(int)

Deletes the object with specified Id.

public override void Delete(int id)

Parameters

id int

Specified Id.

Fill(IDataReader)

Fills the specified reader.

public override void Fill(IDataReader reader)

Parameters

reader IDataReader

The reader.

FillRow(DataRow)

Fills the row.

protected override void FillRow(DataRow row)

Parameters

row DataRow

The 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 int

The id of favorites list.

startIndex int

The start index of range.

pageSize int

The 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 int

The id of the favorite product.

Returns

CustomerProductListProduct

GetProductById(string, string)

Gets product by id.

public static CustomerProductListProduct GetProductById(string productId, string productVariantId)

Parameters

productId string

The id of the product.

productVariantId string

The variant id of the product.

Returns

CustomerProductListProduct

GetProductByIdAndList(int, string, string)

Gets product by id and favorite list Id.

public static CustomerProductListProduct GetProductByIdAndList(int listId, string productId, string productVariantId)

Parameters

listId int

The favorite list Id.

productId string

The id of the product.

productVariantId string

The 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

IEnumerable<CustomerProductListProduct>

GetProductsByListId(int)

Gets products by favorites list id.

public static IEnumerable<CustomerProductListProduct> GetProductsByListId(int id)

Parameters

id int

The 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 string

The 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 int

The 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 int

The id of user.

useCustomerNumberToRetrieveListsProducts bool

If 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 Product

The 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

product Product

The product.

listId int

The list identifier.

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 string

The product identifier.

variantId string

The product variant identifier.

favoriteListId int

The favorite list identifier.

quantity int

The quantity.

UpdateSortOrder(ref string, int, int)

Updates the sort order.

public static void UpdateSortOrder(ref string productId, int favoriteListId, int sortOrder)

Parameters

productId string

The product identifier.

favoriteListId int

The favorite list identifier.

sortOrder int

The sort order.

See Also

To top