Assignment 2 is a more expansive version of Assignment 1. There is now a Login and Registration page users can go to that have their own set of validations. They cannot access the invoice without logging into an account with their email and password first. If they don’t have an account they can register with a full name, email, and password while also putting in a repeat of their password. Upon successful Log In, they are greeted with the invoice and their name in a thank you message. They can then go back to the products display by logging out.
I am much more aware of params and queries and how to access them. So much of our sites rely on properly putting errors/user info in the query and using params.has to display error messages and such. This was also the case in Assignment 1, but I also needed to add deletions as to not have the errors repeat over and over again while also defining way more errors.
I made my own site.
I got some help from peers and teacher. But most of my issues needed the help of ChatGPT and other websites that explained commands in the context of an e-commerce store.
Validations were still implemented, but they worked a little differently from assignment 1 and I needed a whole new approach to it.
I think it was 10% thinking, 30% writing and 70% testing. I spent a lot of time on errors from the code I wrote and had to change out many things over and over again.
I was able to get all my errors to display correctly and prevent invoice access without the user logging in (without cookies and sessions). I was still having a problem with my quantities available updating correctly after adding a new path users can take from the registration page instead of going to the invoice straight.
I wish I had realized certain things about my validations that were just simple logic/mistping errors in the end. I wasted so much time thinking it was a problem with my params instead of just looking at my raw function and placement.