View Categories

Orders placed by user

1 min read

Overview #

The cooler bag system is tied to the user and acts at 3 specific steps during the process of a user placing an order:

  • When the user checks their cart
  • When the user proceeds to the checkout page
  • When a user places an order

In order to understand the cooler bag system actions, one important thing to keep in mind and that was explained in previous topics is that this system creates a checkbox called has cooler bag that is associated with the user () and it uses this checkbox status (checked or unchecked) to take specific actions at those steps.

 

 

 

 

 

User checks their cart #

When a user proceeds to their cart, before the page loads, the system verifies the has cooler bag checkbox.

If the checkbox is checked. The system will not do anything.

If the checkbox is unchecked, the system will do two more verifications:

  • if the cart contains at least an item from our food menu
  • if the cart does not already contain a cooler bag

When those conditions are satisfied, the system will add a cooler bag to the user cart.

 

 

 

 

 

User goes to the checkout page #

When the user proceeds to the checkout page the system will do the same verifications as in the previous step, namely:

the system verifies the has cooler bag checkbox.

If the checkbox is checked. The system will not do anything.

If the checkbox is unchecked, the system will do two more verifications:

  • if the cart contains at least an item from our food menu
  • if the cart does not already contain a cooler bag

When those conditions are satisfied, the system will add a cooler bag to the user cart on the checkout page.

 

 

 

 

 

 

User places an order #

When a user successfully places an order, the cooler bag system will do the following verification:

  • checks if there is a cooler bag in the order that was just placed.

If the system finds the cooler bag, then it changes the status of the checkbox: has cooler bag associated with the user to checked.

This action has an effect on all the other actions of the system regarding this user. The system takes no actions on further orders by a user(because it does not need to) if their has cooler bag checkbox is checked.

 

 

 

Powered by BetterDocs