Assignment 3 Checkpoint

07 May 2022

Show what each page will look like. The pages do not have to be “functional” but the design should clear.

A link to an overview of my application’s design can be found here

Describe your design for your site’s shopping cart. That is, will it be a separate page that the user can view and edit, or will it be integrated into the product pages? If so, describe in detail how this will work on your site. Provide several examples of using the cart.

My sites shopping cart will be a separate page that a user will be able to click on and adjust quantities or remove products all together. Once they add products to their cart, they will be given the option to view their cart, check-out, or return to the home page. The cart will have to store and maintain user’s product data while a user is moving around product pages and assure that the data is in the format that the invoice is expecting.

Explain specifically how you will use sessions to manage your shopping cart. In particular, what shopping cart data will be stored in the session, what data format will be used (NOT what data type, but the format like with the data format used for your registration data). Use code examples showing what data structures (such as arrays and their objects) you will use to manage the shopping cart data and how they will be used in a session.

Sessions will be utilized to manage my shopping cart as the method to store quantity data so that if a user logs-in they can return to their cart. The data stored within sessions will be through arrays in JSON. Unlike previous assignments, this one will require more than one variety and as a result will be formatted as such:

{“ribeye”: [0,0,0,1,0,0], “ny-strip”: [0,1,0,0,0,0], “porterhouse”: [0,2,0,0,0,1]}

How will you avoid access to your application when the user has not logged in or registered? What are the particular security concerns you must address?

In order to assure that users that are not logged in are unable to access certain parts of the application, I will utilize cookies to store that a user is logged in and sessions to maintain product data. When a user gets to the site, the cookie stored on their browser will either match them with a session or the cookie will not match and the user will have to login or register.


      $_SESSION[‘loggedIn’] = true;

      (When attempting to go to invoice)
      if($_SESSION[‘loggedIn’])
            else
                  header(‘Location: /login.html’)

Upon a successful login, how do you provide personalization in your UI? Explain how you did or will do this (paste code if necessary)

Upon a successful login, the user’s name and email will be listed on the invoice and the user’s name will be listed on the navigation ribbon. I will also implement a delayed redirect that prints “Logging (username) in…”

If you are working with partners, how will you split up the work in your team so that you are working in parallel as effectively as possible? That is, who is doing what and when?

I am not working with a partner.

How are you approaching Assignment 3 differently than Assignment 2?

In comparison to Assignment 2, I am trying to approach Assignment 3 with a lot more critical thinking and planning. Instead of just writing code, I am first thinking about how I want the different processes of the application to function. There are so many different ways to accomplish the same task within this assignment so it is crucial to plan the structure of the application out in order to assure that everything functions cohesively.