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:
-
domElementObjectcurrent 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:
-
dataStringService 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:
-
optionsAnyObject of product catalog data.
-
ServicePathStringService URL.
-
SitePathStringSite URL.
-
templatePathStringHTML path.
-
currentUserLoggedInID:StringUser Linked ID.
-
domElementObjectProduct catalog DOM element.
-
dataObjectList of all products.
-
shoppingCartObjecteb_shoppingCart.shoppingCartModel instance.
-
eb_productCatalog.pagerModel
-
records
Pagination model. Contains computed functions that get invoked when page size change or page navigation.
Parameters:
-
recordsObjectProduct list.
eb_productCatalog.productModel
-
data -
parent
Product model. Converts product object into knockout model.
Parameters:
-
dataObjectProduct object.
-
parentObjectInstance of eb_productCatalog.model for accessing its properties.
eb_productCatalog.render
-
options
The service will return product catalog HTML.
Parameters:
-
optionsAnyArray of required data.
-
templatePathStringProduct catalog template URL.
-
Returns:
Product catalog HTML template.
eb_productCatalog.searchRecords
-
toSearch -
fields -
productList
Product catalog search function.
Parameters:
-
toSearchStringValue entered in search text-box field.
-
fieldsObjectArray of product properties on which search will be performed.
-
productListObjectList of product models.
eb_productCatalog.shoppingCart
-
shoppingCart
Global function to hold shopping cart object.
Parameters:
-
shoppingCartObjectInstance 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.
