My website allows customers to buy handmade items. These items include ceramic mugs, glass cups, and vases. There is a search bar where you can search for the particular product you are looking for (depending on which page you are on) and a cart that holds all the user’s information that is relevant to what is needed on the website (such as the email and name).
Unfortunately, I was not able to show how many items were in the cart. I was also unable to subtract the bought items from the quantity available and weirdly when I checked out on the server I was not able to get an email (even though it stated the email was sent).
I think the overall design of my website looks really nice and I really like the search bar functionality. I thought that making the search bar was going to be a lot harder than it was and I think it works perfectly. I also like the alerts that pop up on the system, letting the user know that there are errors, or my favorite, when the user is not logged in that they try to check out, there is an alert telling them to log in and it also brings them to the login page.
I wish I could figure out why the email was not sent to the user’s email, even though the message said it did get sent. I also wish that I was able to shoe how many items were in the user’s cart, it seems like it would have been easy code to implement.
I can see why it would have been a lot more simpler to start from scratch because I ended up deleting and rewriting a lot of code. Using the cookies and sessions made it a lot easier to keep track of user data and the quantities that the user wanted.
Many times when I ran into a problem I started to google search for solutions. Sometimes I would find a solution but other items I was not able to, so at that point I made an appointment with Professor Port to go over my code (which I had to do many times)!
Implementing the search bar was surprisingly easy. Also, the assignment of 3 examples helped a lot when it came to implementing the cart and displaying the products (considering that we added different kinds of products and changes the products_data.json file format).
Originally, I had a separate invoice.html, however, it was difficult to send the whole html in the email. So instead, I ended up generating the invoice on the server in a string which then made it very easy to not only send the email, but also to request the user data.
I feel like I learned a lot about cookies and sessions when it comes to completing assignment 3. The cookies are used to keep track of user data such as their username and name and the session made it easy to keep track of the products in the user’s cart.
I would start on this assignment earlier (a recurring theme for me)! Even though I started on this assignment earlier than the last one, I ran into way more problems than in assignment 2 and I feel like I could have refined a lot of my problems better if I were to start on this assignment even earlier.
Similar to assignment 2, I spent about 50% of my time thinking about how I should go about implementing the code that would complete the given requirements. About 10% of my time actually writing my code (as well as choosing which code I need to delete), since it didn’t take that long to put into code (or delete them) after thinking about what I needed to get done. And lastly, I believe I spent about 40% of my time actually testing and debugging my code, since I did run into some problems.
I worked on this assignment on my own (with the help of Professor Port, to which I would not have done as much as I did)!