Table of Contents

Class CustomerProductList

Namespace
Dynamicweb.Ecommerce.CustomerCenter
Assembly
Dynamicweb.Ecommerce.dll

CustomerProductList class.

public class CustomerProductList : DbObject
Inheritance
CustomerProductList
Inherited Members

Constructors

CustomerProductList()

Initializes a new instance of the CustomerProductList class.

public CustomerProductList()

Properties

AccessUserId

Gets or sets the access user identifier.

public int AccessUserId { get; set; }

Property Value

int

The access user identifier.

Description

Gets or sets the description.

public string Description { get; set; }

Property Value

string

The description.

IsDefault

Gets or sets a value indicating whether this instance is default.

public bool IsDefault { get; set; }

Property Value

bool

true if this instance is default; otherwise, false.

IsPublished

Gets or sets a value indicating whether this instance is published.

public bool IsPublished { get; set; }

Property Value

bool

true if this instance is published; otherwise, false.

IsShared

Gets or sets a value indicating whether this instance is shared.

public bool IsShared { get; set; }

Property Value

bool

true if this instance is shared; otherwise, false.

ListId

Gets or sets the list identifier.

public int ListId { get; set; }

Property Value

int

The list identifier.

Name

Gets or sets the name.

public string Name { get; set; }

Property Value

string

The name.

Products

Gets user's favorits products

public IEnumerable<CustomerProductListProduct> Products { get; }

Property Value

IEnumerable<CustomerProductListProduct>

User's favorite products. The collection is read-only.

ProductsCount

Gets the count of products

public int ProductsCount { get; }

Property Value

int

The count of products.

ProductsQuantity

Gets the quantity of products

public int ProductsQuantity { get; }

Property Value

int

The quantity of products.

PublishedId

Gets or sets the published identifier.

public string PublishedId { get; set; }

Property Value

string

The published identifier.

PublishedToDate

Gets or sets the published to date.

public DateTime? PublishedToDate { get; set; }

Property Value

DateTime?

The published to date.

Type

Gets or sets the type.

public string Type { get; set; }

Property Value

string

The type.

Methods

AddToFavorites(Product)

Adds to favorites.

public static void AddToFavorites(Product product)

Parameters

product Product

The product.

AddToFavorites(string, string)

Adds to favorites.

public static void AddToFavorites(string productId, string variantId)

Parameters

productId string

The product identifier.

variantId string

The variant identifier.

AddToFavorites(string, string, int)

Adds to favorites.

public static void AddToFavorites(string productId, string variantId, int favoriteListId)

Parameters

productId string

The product identifier.

variantId string

The variant identifier.

favoriteListId int

The favorite list identifier.

AddToFavorites(string, string, string, string, string, int)

Adds to favorites.

public static void AddToFavorites(string productId, string variantId, string listName, string listType, string listDescription, int favoriteListId)

Parameters

productId string

The product identifier.

variantId string

The variant identifier.

listName string

Name of the list.

listType string

Type of the list.

listDescription string

The list description.

favoriteListId int

The favorite list identifier.

AddToFavorites(string, string, string, string, string, int, int)

Adds to favorites.

public static void AddToFavorites(string productId, string variantId, string listName, string listType, string listDescription, int favoriteListId, int userId)

Parameters

productId string

The product identifier.

variantId string

The variant identifier.

listName string

Name of the list.

listType string

Type of the list.

listDescription string

The list description.

favoriteListId int

The favorite list identifier.

userId int

The user identifier.

ClearCache(User)

Clears the cache.

public static void ClearCache(User user)

Parameters

user User

The user.

ClearCache(UserGroup)

Clears the cache.

public static void ClearCache(UserGroup group)

Parameters

group UserGroup

The group.

ClearCache(int)

Clears the cache.

public static void ClearCache(int userId)

Parameters

userId int

The user 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.

ForceInitializeAllProducts()

public void ForceInitializeAllProducts()

GeneratePublishedId()

Generates the published identifier.

public static string GeneratePublishedId()

Returns

string

System.String.

GetDefaultList(IEnumerable<CustomerProductList>)

Gets the default favorite list by user id.

public static CustomerProductList GetDefaultList(IEnumerable<CustomerProductList> favouriteListCollection)

Parameters

favouriteListCollection IEnumerable<CustomerProductList>

The user id of favorite list.

Returns

CustomerProductList

The favorites list

GetDefaultList(int)

Gets the default favorite list by user id.

public static CustomerProductList GetDefaultList(int userId)

Parameters

userId int

The user id of favorite list.

Returns

CustomerProductList

The favorites list

GetListByCustomerId(int)

Gets the favorites list by user id.

public static IEnumerable<CustomerProductList> GetListByCustomerId(int customerId)

Parameters

customerId int

The id of user

Returns

IEnumerable<CustomerProductList>

The favorites list

GetListById(int)

Gets the favorite list by id.

public static CustomerProductList GetListById(int id)

Parameters

id int

The id of favorite list.

Returns

CustomerProductList

The favorite list

GetListById(int, IEnumerable<CustomerProductList>)

Gets the list by identifier.

public static CustomerProductList GetListById(int id, IEnumerable<CustomerProductList> favouriteListCollection)

Parameters

id int

The identifier.

favouriteListCollection IEnumerable<CustomerProductList>

The favourite list collection.

Returns

CustomerProductList

CustomerProductList.

GetListByPublishedId(string)

Gets the favorite list by published id.

public static CustomerProductList GetListByPublishedId(string publishedId)

Parameters

publishedId string

The published id of favorite list.

Returns

CustomerProductList

The favorite list

GetListByType(IEnumerable<CustomerProductList>, string)

Gets the favorites list by type.

public static IEnumerable<CustomerProductList> GetListByType(IEnumerable<CustomerProductList> productListCollection, string type)

Parameters

productListCollection IEnumerable<CustomerProductList>

The product list collection.

type string

The type.

Returns

IEnumerable<CustomerProductList>

The favorites list by type

GetListByType(int, string)

Gets the favorites list by user id.

public static IEnumerable<CustomerProductList> GetListByType(int customerId, string type)

Parameters

customerId int

The id of user

type string

The type.

Returns

IEnumerable<CustomerProductList>

The favorites list

GetListTypesByCustomerNumber(string)

Gets the favorites list types by user customer number.

public static IEnumerable<string> GetListTypesByCustomerNumber(string customerNumber)

Parameters

customerNumber string

The user customer number

Returns

IEnumerable<string>

The favorites list

GetListTypesByUser(int)

Gets the favorites list by user id.

public static IEnumerable<string> GetListTypesByUser(int customerId)

Parameters

customerId int

The id of user

Returns

IEnumerable<string>

The favorites list

GetListsByUserCustomerNumber(string)

Gets the lists by user customer number.

public static IEnumerable<CustomerProductList> GetListsByUserCustomerNumber(string customerNumber)

Parameters

customerNumber string

The customer number of user

Returns

IEnumerable<CustomerProductList>

The favorites list

GetProductKey(string, string)

public static string GetProductKey(string productId, string variantId)

Parameters

productId string
variantId string

Returns

string

GetProductLists(int, string, bool, string, bool, int, int)

Returns favorite lists for users or groups. They could be optionally sorted or filtered by search text and user/group id.

public static IEnumerable<CustomerProductList> GetProductLists(int userOrGroupId, string search, bool isShared, string sortField, bool isAscending, int startItem, int endItem)

Parameters

userOrGroupId int

The user or group id.

search string

The text to search.

isShared bool

Describes if favorite lists for groups should be get.

sortField string

The sorting property.

isAscending bool

The order of sorting.

startItem int

Start index.

endItem int

End index.

Returns

IEnumerable<CustomerProductList>

GetProductLists(string, string, bool, int, int)

Returns all favorite lists. They could be optionally sorted of filtered by search text.

public static IEnumerable<CustomerProductList> GetProductLists(string search, string sortField, bool isAscending, int startItem, int endItem)

Parameters

search string

The text to search.

sortField string

The sorting property.

isAscending bool

The order of sorting.

startItem int

Start index.

endItem int

End index.

Returns

IEnumerable<CustomerProductList>

GetProductListsCount(int, string, bool)

public static int GetProductListsCount(int userId, string search, bool isShared)

Parameters

userId int
search string
isShared bool

Returns

int

GetProductLookup()

public Dictionary<string, Product> GetProductLookup()

Returns

Dictionary<string, Product>

RemoveFromFavorites(Order)

Removes from favorites.

public static void RemoveFromFavorites(Order order)

Parameters

order Order

The order.

RemoveFromFavorites(string, string)

Removes from favorites.

public static void RemoveFromFavorites(string productId, string variantId)

Parameters

productId string

The product identifier.

variantId string

The variant identifier.

RemoveFromFavorites(string, string, int, double)

Removes from favorites.

public static void RemoveFromFavorites(string productId, string variantId, int favoriteListId, double quantity)

Parameters

productId string

The product identifier.

variantId string

The variant identifier.

favoriteListId int

The favorite list identifier.

quantity double

The quantity.

RemoveFromFavorites(string, string, int, double, bool)

Removes from favorites.

public static void RemoveFromFavorites(string productId, string variantId, int favoriteListId, double quantity, bool isRemoveFromList)

Parameters

productId string

The product identifier.

variantId string

The variant identifier.

favoriteListId int

The favorite list identifier.

quantity double

The quantity.

isRemoveFromList bool

if set to true [is remove from list].

Save()

Saves current data to the database.

public override void Save()

See Also

To top