How to improve the checkout system for the Etsy project?

I enjoy the Etsy demo project so much! Thanks for the course! I am also wondering where I can learn more about the online marketplace checkout system, e.g. storing customer's delivery address when first order, and then retrieve the shipping address later when the customer purchase next time.

Posted about 4 years ago by flo
Posted almost 4 years ago by flo

Thanks Albert and Alex! I feel like the most difficult part to implement is linking the order with each new shipping address that the customer type. Such as the customer will type new address when he/she places a new order, and just occasionally uses the ones in database. What steps should I approach in order to build a sophisticated checkout system like Amazon?

Posted almost 4 years ago by Alex Yang

The approach I would use is to create a new model of ShippingAddresses. These shipping addresses should have a belongs_to/has_many relationship with your customers (see for more info).

Posted about 4 years ago by Alex Yang

I agree with Albert - you'll need to save their shipping address in your database so that you'll be able to retrieve it next time the same user places an order. Try setting it up and see if you can get it to work!

Posted about 4 years ago by Albert Pak

I would suggest looking into creating a model for an address and make that related to a customer model - that way user can have shipping addresses like on Amazon