Private_the poolconnection used to communicate with the database.
the id of the user that needs to be checked for a shoppingCart.
Private_private helper method that automatically makes a new cart in case user doesn't have a shoppingCart. Uses an already existing poolconnection
the user's id to make a new shopping cart
the pool connection that this method can use to communicate with the database. To prevent multiple pool connections from being used by the same person.
Adds a single product to an user's cart
the amount of a single product the user wants to buy
the id of the game or product the user wants to buy
the id of the current user
Changes the amount of a shoppingItem in a logged in user's shopping cart
the amount the user wants to product to have. Not add, have.
the id of the shoppingItem the user wants to change.
the id of the logged in user that wants to change the amount of a shopping item.
Deletes from the database, a shoppingitem from a logged in user's shoppingcart
the id of the shoppingItem that needs to be deleted
the id of the user that wants to remove a shopping item from their shopping cart
Retrieves all the products in an user's shoppingcart
requires the id of the current user
returns an array of all the shoppingItems of the current user and a total price. This price also includes any active prices.
Checks if an user has a shoppingCart and calls _makeNewCart() in case user doesn't