API Docs for:
Show:

eb_adminShoppingCart Class

Shopping cart class.

Methods

eb_adminShoppingCart.addItemToCart

(
  • data
)
Object

This method used to add product to cart. Based on the product type will call the service.

Parameters:

  • data Object

    Object of required data.

    • newCartItem Boolean

      Boolean value to specify whether item is added to the current cart for first time .

    • productId Number

      Product ID.

    • productType String

      Product type.

    • quantity Number

      Quantity.

Returns:

Object:

jQuery promise object return product details which we want to add in your cart

eb_adminShoppingCart.addItemToCartService

(
  • data
  • servicePath
)
Object

This method used to add product to cart. Based on the product type will call the service.

Parameters:

  • data Object

    Here data contains product id and quantity.

  • servicePath String

    Service URL for the current product type.

Returns:

Object:

jQuery promise object return product details which we want to add in your cart.

eb_adminShoppingCart.addSubscriptionGeneralProductItemsToCart

(
  • data
)
Object

This method used to add subscription general products to cart.

Parameters:

  • data Object

    Object of required data.

Returns:

Object:

jQuery promise object return product details which we want to add in your cart

eb_adminShoppingCart.checkout

(
  • data
)
Object

This method is used to checkout cart.

Parameters:

  • data Object

    Credit card details or purchase order number.

    • parameter String

      "CreditCard" or "PurchaseOrder".

Returns:

Object:

jQuery promise return the id

eb_adminShoppingCart.emptyCart

() String

This method is used to remove all cart items.

Returns:

String:

jQuery promise return undefined

eb_adminShoppingCart.eventProductItems

() Object

This method is used to view cart items with event product. The service call will return shopping cart data.

Returns:

Object:

jQuery promise object return event product Items

eb_adminShoppingCart.getEventProductItems

(
  • cartItems
)
Object

This method is used to view cart items with event product. The service call will return shopping cart data.

Parameters:

  • cartItems String

    cartItems in view cart

Returns:

Object:

jQuery promise object return event product Items

eb_adminShoppingCart.getShoppingCart

() Object

This method is used to get shopping cart record.

Returns:

Object:

jQuery promise return shopping cart details

eb_adminShoppingCart.removeCartItem

(
  • data
)
Object

This method used to remove product from cart.

Parameters:

  • data Object

    Product id.

Returns:

Object:

jQuery promise object return product details which we want remove from cart

eb_adminShoppingCart.removeCartItem

(
  • data
)
Object

This method used to remove product from cart.

Parameters:

  • data Object

    Product id.

Returns:

Object:

jQuery promise return undefined

eb_adminShoppingCart.render

(
  • options
)
String

The service will return shopping cart HTML.

Parameters:

  • options Any

    Array of required data.

    • templatePath String

      Shopping cart template URL.

Returns:

String:

jQuery promise object which when resolved returns HTML template.

eb_adminShoppingCart.shoppingCartModel

(
  • options
)

Shopping cart model responsible to all shopping cart operations.

Parameters:

  • options Any

    Object of cart data.

    • cartItems Object

      List of cart items.

    • domElement Object

      Shopping cart DOM element.

    • shoppingCartData Object

      Shopping cart data.

eb_adminShoppingCart.updateCartItem

(
  • data
)
Object

This method used to update cart's item. Based on the product type will call the service. The service call will return updated shopping cart data.

Parameters:

  • data Object

    Here data contains product id, product type and quantity.

Returns:

Object:

jQuery promise object return updated product details

eb_adminShoppingCart.updateCartItemService

(
  • data
  • servicePath
)
Object

This method used to update cart's item. Based on the product type will call the service. The service call will return updated shopping cart data.

Parameters:

  • data Object

    Here data contains product id and quantity.

  • servicePath String

    Service URL for the current product type.

Returns:

Object:

jQuery promise object return updated product details.

eb_adminShoppingCart.updateShoppingCart

(
  • data
)
Object

This method is used to update shopping cart's couponId, couponName, shippingAddressId and billingAddressId.

Parameters:

  • data Object

    Billing and shipping address ids.

Returns:

Object:

jQuery promise return updated shopping cart details

eb_adminShoppingCart.viewCartItems

() Object

This method is used to view cart items. The service call will return shopping cart data.

Returns:

Object:

jQuery promise object return view cart Items

eb_adminShoppingCart.viewSubscriptionCartItems

(
  • cartItems
)
Object

This method is used to view cart items with subscription product. The service call will return shopping cart data.

Parameters:

  • cartItems String

    cartItems in view cart

Returns:

Object:

jQuery promise object return subscription cart Items

Properties

eb_adminShoppingCart.productType

Object Array of product type names.

Service URL based on product types.

eb_adminShoppingCart.ServicePath

String

SOA path. It would be set from configuration file.

eb_adminShoppingCart.serviceUrls

Object Object containing different shopping cart related service URLs.

Shopping cart service URLs.

eb_adminShoppingCart.SitePath

String

Site path. It would be set from configuration file.

eb_adminShoppingCart.TemplatePath

String

Shopping cart template path.