Hi,
I guess as many people, I am very new to Rails. I used a book to create a shopping cart and then modified the code to try and fit it to my project's requirements. I have been trying figure this out for the last week and starting to get really discouraged about the prospects of solving this. I know what needs to be done but I'm at a loss for how to achieve it. So, I wanted to ask, for help. Please please please.
Background: I have the following classes: customer, product, cart, cart_items, order, order_items A customer needs to login to even see the "Add to cart" links -- so the same goes for viewing cart and checkout. (which is achieved). Things I have trouble with: 1) The sessions are stored in the db. Right now, customer session and cart session are separate. I need to assoociate them together. So, when a customer loggs out and a new customer logs in, they have different carts. If the session can remember the cart items, if the same customer logs in again, that would be great. The customer id will also need to be stored in the orders tables as well. 2) I suddently have trouble even trying to add an item to the cart. 3) I need to figure out a way to update the quantity of items (products) in the cart. 4) And lastly, my checkout page doesn't come up suddenly as well
Please can anyone have a look and help me solve this? Any help will be so much appreciated, Thanks, Elle