Checkpoint Assignment#3

07 May 2021

Link to Screencast: https://youtu.be/0jqTNL1jvh8

Describe the pages: Home Page- Have a navbar with all the pages the use is able to go to. A subnav bar of all the links to the products. Body will display all the products availble

Products Page: Same as Home page, ecept the pages will be unique to the product type. e.g Bracelets, neckalces, etc. Will be able to click on cart button to review items

Cart Page: Review items and the overall total. Will be similar to the invoice page, except the template is different and the way to get the quantites and product names will be different.

Login/Registration- Login page is where they will get the cookie. After registering, the user will be redirected to the Login page and asked to log in with their newly created username and password. The user will only be able to view the cart after successfully logging in

Email Reciept page: Uniquely thank the user by thanking their name attacked to the username data. Will notify that their reciept is sent to the specific address and that the recipet will actually be sent

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 cart will be a separate page. It will be in a similar format as what my invoice was, except this time I used a template for my Receipt, which will now be functioning as my cart. My cart, like the invoice was, will display the items selected, quantities selected, the price, shipping, taxes, and total. The only thing that should be different is the way I retrieve the quantities from the cart session that will store the quantities selected by the user. The cart will act as a way the user can view their items selected. In order to edit the quantities selected, the user will have to go back to the display products page and edit the items there since I will only have the session store data through the displayproducts page. 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. Basically the session will be holding the quantities selected by the user and will keep track of the quanitites selected all the way up the time the user presses “confirm purchase” which will be on the Cart page. The session will have a similar structure as my product.json page where the product type will display as the object and the product name and the quantities will show up as an array. This part Professor Port helped me out with and understand when we outputted it on the console log. However, the only thing that I will be needing from this session will be the product type and the quanitity, I will need to find a way still on how I will output the quantity onto my cart using the cart session as my source of where I get my quantities. 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? I will use my cookie to keep track if a user is logged in or if this is the users first time making a purchase. When the user clicks on the shopping cart logo they will be checked if they have a cookier or not. If they don’t have a cookie then they will be directed to the logged in page because we aassume that the user is not logged and this is their first time purchasing things. The user will not be able to get to the cart without going throught the Log in page and getting the cookie after successfully logging. After successfully logging in the user will be redirected to the cart page and from the cart page, because they have the cookie, they will be able to go back to the products apge and select more items, and when they click the cart button again they will be checked for a cookie and this time they should have it and then they should be automatically directed to the cart page. Upon a successful login, how do you provide personalization in your UI? Explain how you did or will do this (paste code if necessary) After a successful log, the user should be given a cookie throughout their whole time they are on the website browsing the products. I will do the same personalization as I did for Assignment2 where I retrieve their information using the username. script> document.write(<h1>Thank You for Your order ${params.get('username')}!</h1>); </script>

How are you approaching Assignment 3 differently than Assignment 2? getting more help when I need it instead of blindly going in it. Also, have my Assignment checked before turning it in to resolve any problems. Maybe have professor do a check through 5 days before due date (Sunday). Another thing that is super helpful for this Assignment 3 is that we are forced to plan out what we are going to do in the Assignment3. This helps get a better picture of what needs to be done for this Assignment3.