I actually have 2 questions:
1. Right now when a customer logs in, he gets redirected to the 1st
page in the catalog, and the cart session is stored in the database.
How can I redirect the customer to his last visited page at login?
2. When the same customer checks out, he needs to fill out his
address. There is a model for customers, which the administrator
controls. The administrator can enter the customer's email, address,
phone and so on.
How can I make that the details that are on file, get remembered and
automatically filled out in the checkout form (so the customer does
not have to enter them again and again)?
The models are:
cart - controls checkout
Relationships in the Cart class are:
has_many :products, :through => :cart_items
An example from my checkout form:
<p><%= text_field :order, :email %></p>
Any help will be much appreciated.