cartModule

cartModule

class to handle cart functions

Constructor

new cartModule()

Source:

Methods

(async, static) addNewCartEntry(req, userDetails, locationID) → {object}

Source:

add New Cart Entry

Parameters:
Name Type Description
req object

req object

userDetails object

user details object

locationID number

location ID which has to be added

Returns:

sql response

Type
object

(async, static) allCartItems(req, data, count) → {object}

Source:

All cart items fetch

Parameters:
Name Type Description
req object

req object

data number

req.body object

count number

count for the pagination

Returns:

sql response

Type
object

(async, static) cartLocationDetails(cartID) → {object}

Source:

cart Location Details

Parameters:
Name Type Description
cartID number

cart ID the location details to be fetched

Returns:

sql response

Type
object

(async, static) changeCartStatus(req, cartChange, id) → {object}

Source:

change cart status

Parameters:
Name Type Description
req number

req object

cartChange number

cart change details

id number

cart ID which status has to be changed

Returns:

sql response

Type
object

(async, static) checkUserCartExists(req, id) → {object}

Source:

Check Product exists for the users

Parameters:
Name Type Description
req object

req object

id object

project id to check

Returns:

sql response

Type
object

(async, static) checkUserProductExists(req, id) → {object}

Source:

Check Product exists for the users

Parameters:
Name Type Description
req object

req object

id object

project id to check

Returns:

sql response

Type
object

(async, static) checkUserUnPaidExists(req) → {object}

Source:

Check User has un paid items exists

Parameters:
Name Type Description
req object

req object

Returns:

sql response

Type
object

(async, static) getAllCarts(req, data, count) → {object}

Source:

All cart items fetch

Parameters:
Name Type Description
req object

req object

data number

req.body object

count number

count for the pagination

Returns:

sql response

Type
object

(async, static) getAllPendingCartID(req) → {object}

Source:

get All Pending Cart ID

Parameters:
Name Type Description
req object

req object

Returns:

sql response

Type
object

(async, static) getAllPendingCartItems(req, cartID) → {object}

Source:

get All Pending Cart Items

Parameters:
Name Type Description
req object

req object

cartID number

cart ID which items has to be fetched

Returns:

sql response

Type
object

(async, static) getCartDetails(cartID) → {object}

Source:

Get all cart details

Parameters:
Name Type Description
cartID number

cart ID the details to be fetched

Returns:

sql response

Type
object

(async, static) getSearchSortCategories(req, data) → {object}

Source:

Get all sort and filtered values

Parameters:
Name Type Description
req object

req object

data object

req.body object

Returns:

sql response

Type
object

(async, static) updateBuyerPremium(data, pid)

Source:

update buyer premium

Parameters:
Name Type Description
data object

data

pid number

project id

(async, static) updateCartData(data, id) → {object}

Source:

Update Cart Entry

Parameters:
Name Type Description
data object

req.body object

id number

cart ID which has to be updated

Returns:

sql response

Type
object

(async, static) updateCheckout(req) → {object}

Source:

update cart

Parameters:
Name Type Description
req number

req object

Returns:

sql response

Type
object

(async, static) updateInvoice(req) → {object}

Source:

update invoice

Parameters:
Name Type Description
req number

req object

Returns:

sql response

Type
object