- What did you learn yesterday?
- What are you going to do today?
- What do you expect to learn?
Well, after a lot of bashing my head against it, I got the shopping cart to work! And it persists! And I can change the quantity of the books I’m adding! It doesn’t sum up my order, but by the time I got the cart working I was super done for the day. I don’t know why it says “Line item was successfully created” twice up there, I think I have too many notices going on, but when I was trying to get it working last night I would either have two or none. I think maybe the Bootstrap stuff we did is having some effect on it, since the top one is in a blue box. One of the things that I found really frustrating when I was working on this is that there doesn’t seem to exist a simple bulleted list of how to make a shopping cart in Rails. There are lots of tutorials, but they’re generally part of a pre-existing project where the author has had you make models and controllers with an eye to the eventual goal of adding features like a shopping cart. I’m pairing with Brandon today, and I think I might get him to go though it with me so I can feel less frustrated next time. Sadly for me, shopping carts are on the web to stay, so I should figure out a better way of doing them than the hodgepodge of tutorials and suggestions from other people that I currently have.
Today I actually made a list of things I want to accomplish.
- Make my cart sum my order
- Add a link to “Jessa’s Bookstore” to make it go back to the index when you click it
- Figure out why the alert is showing twice
- Add ability to delete a book from the cart
- Work on the feature tests for the shopping cart
One of these is easy, and I shall do that first. 🙂
Hopefully I will end the day with a list of how to make a shopping cart (I wonder if that would be worth a blog post? Maybe I should suggest it to Ellen.), as well as a completely working shopping cart. Provided that happens, I think I can work on Stripe tomorrow!