eb_productCatalog Class
Product Catalog class.
Item Index
Methods
Properties
- eb_productCatalog.currentPageSize
- eb_productCatalog.defaultErrorMessage
- eb_productCatalog.defaultImage
- eb_productCatalog.errorResponses
- eb_productCatalog.getAllProductsService
- eb_productCatalog.pageSizeOptionsList
- eb_productCatalog.productDetailsPage
- eb_productCatalog.ServicePath
- eb_productCatalog.SitePath
- eb_productCatalog.TemplatePath
Methods
eb_productCatalog.domElement
-
domElement
Page DOM element.
Parameters:
-
domElement
Objectcurrent DOM element.
eb_productCatalog.fieldsToSearch
()
Object
List of product properties on which search is applied.
Returns:
Array of product name property.
eb_productCatalog.getProducts
-
data
Get products data from the server through the get service call. The service will return list of all products.
Parameters:
-
data
StringService URL if passed from calling function.
Returns:
jQuery promise object which when resolved returns list of products.
eb_productCatalog.model
-
options
Product catalog model responsible to all product catalog operations.
Parameters:
-
options
AnyObject of product catalog data.
-
ServicePath
StringService URL.
-
SitePath
StringSite URL.
-
templatePath
StringHTML path.
-
currentUserLoggedInID:
StringUser Linked ID.
-
domElement
ObjectProduct catalog DOM element.
-
data
ObjectList of all products.
-
shoppingCart
Objecteb_shoppingCart.shoppingCartModel instance.
-
eb_productCatalog.pagerModel
-
records
Pagination model. Contains computed functions that get invoked when page size change or page navigation.
Parameters:
-
records
ObjectProduct list.
eb_productCatalog.productModel
-
data
-
parent
Product model. Converts product object into knockout model.
Parameters:
-
data
ObjectProduct object.
-
parent
ObjectInstance of eb_productCatalog.model for accessing its properties.
eb_productCatalog.render
-
options
The service will return product catalog HTML.
Parameters:
-
options
AnyArray of required data.
-
templatePath
StringProduct catalog template URL.
-
Returns:
Product catalog HTML template.
eb_productCatalog.searchRecords
-
toSearch
-
fields
-
productList
Product catalog search function.
Parameters:
-
toSearch
StringValue entered in search text-box field.
-
fields
ObjectArray of product properties on which search will be performed.
-
productList
ObjectList of product models.
eb_productCatalog.shoppingCart
-
shoppingCart
Global function to hold shopping cart object.
Parameters:
-
shoppingCart
ObjectInstance of eb_shoppingCart.shoppingCartModel.
Properties
eb_productCatalog.currentPageSize
Number
Current page Size.
Default: 12
eb_productCatalog.defaultErrorMessage
String
Default error message.
eb_productCatalog.defaultImage
String
Default image URL. If product image is not available, default image will be shown.
eb_productCatalog.errorResponses
Object
Globally defined error codes object for the control. Every error code should have boolean 'useServerMessage' attribute, which when true suggests we are showing service error message on the UI. If the 'useServerMessage' is defined as false, then provide another attribute 'frontEndMessage' with the error string which will be shown on UI. If 'useServerMessage' is false and 'frontEndMessage' is not defined, default error message will be shown. If service error response contains error code not defined in this object then default error message will be shown.
eb_productCatalog.getAllProductsService
String
Service path to get all products.
eb_productCatalog.pageSizeOptionsList
Object
Page size option list for product catalog.
eb_productCatalog.productDetailsPage
String
Site path to get product details.
eb_productCatalog.ServicePath
String
SOA path.
eb_productCatalog.SitePath
String
Site path. It would be set from configuration file.
eb_productCatalog.TemplatePath
String
Product catalog template path.