API Docs for:
Show:

eb_productCatalog Class

Product Catalog class.

Methods

eb_productCatalog.domElement

(
  • domElement
)

Page DOM element.

Parameters:

  • domElement Object

    current DOM element.

eb_productCatalog.fieldsToSearch

() Object

List of product properties on which search is applied.

Returns:

Object:

Array of product name property.

eb_productCatalog.getProducts

(
  • data
)
Object

Get products data from the server through the get service call. The service will return list of all products.

Parameters:

  • data String

    Service URL if passed from calling function.

Returns:

Object:

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 Any

    Object of product catalog data.

    • ServicePath String

      Service URL.

    • SitePath String

      Site URL.

    • templatePath String

      HTML path.

    • currentUserLoggedInID: String

      User Linked ID.

    • domElement Object

      Product catalog DOM element.

    • data Object

      List of all products.

    • shoppingCart Object

      eb_shoppingCart.shoppingCartModel instance.

eb_productCatalog.pagerModel

(
  • records
)

Pagination model. Contains computed functions that get invoked when page size change or page navigation.

Parameters:

  • records Object

    Product list.

eb_productCatalog.productModel

(
  • data
  • parent
)

Product model. Converts product object into knockout model.

Parameters:

  • data Object

    Product object.

  • parent Object

    Instance of eb_productCatalog.model for accessing its properties.

eb_productCatalog.render

(
  • options
)
String

The service will return product catalog HTML.

Parameters:

  • options Any

    Array of required data.

    • templatePath String

      Product catalog template URL.

Returns:

String:

Product catalog HTML template.

eb_productCatalog.searchRecords

(
  • toSearch
  • fields
  • productList
)

Product catalog search function.

Parameters:

  • toSearch String

    Value entered in search text-box field.

  • fields Object

    Array of product properties on which search will be performed.

  • productList Object

    List of product models.

eb_productCatalog.shoppingCart

(
  • shoppingCart
)

Global function to hold shopping cart object.

Parameters:

  • shoppingCart Object

    Instance 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.