# Expanding Shopping Cart Tutorial

**URL:** <https://discuss.rubyonrails.org/t/expanding-shopping-cart-tutorial/3431>\
**Category:** rubyonrails-talk\
**Created:** [October 23, 2006, 2:48am UTC](https://discuss.rubyonrails.org/t/expanding-shopping-cart-tutorial/3431 "2006-10-23T02:48:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vgkids](https://avatars.discourse-cdn.com/v4/letter/v/a5b964/32.png) [@vgkids](https://discuss.rubyonrails.org/u/vgkids)\
**Post date:** [October 23, 2006, 2:48am UTC](https://discuss.rubyonrails.org/t/expanding-shopping-cart-tutorial/3431/1 "2006-10-23T02:48:45Z")

</div>

I'm following the Agile Development with Rails shopping cart tutorial, and while some of its sticking, I'm still far from proficient. Basically, I'm trying to use their shopping cart example as the base for my store, but I need products in the store to have line items themselves- for example:

my site sells custom printed t-shirts wholesale. I'm imagining a customer will add a t-shirt order to their cart, and then from there, be able to add line items - 5 smalls, 5 mediums, etc. Anyone have any general suggestions on how I should set the tables up and associate the line items with the products? So that a customer could have multiple shirt orders, each with it's own set of line items?

Many thanks in advance, and I'm happy to trade printing for code.

---

<div class="post-metadata">

**Author:** ![Benjamin\_Curtis1](https://avatars.discourse-cdn.com/v4/letter/b/9de0a6/32.png) [@Benjamin\_Curtis1](https://discuss.rubyonrails.org/u/Benjamin_Curtis1)\
**Post date:** [October 23, 2006, 12:49pm UTC](https://discuss.rubyonrails.org/t/expanding-shopping-cart-tutorial/3431/2 "2006-10-23T12:49:22Z")

</div>

You might be interested in my book about building ecommerce sites using Rails:

[http://www.agilewebdevelopment.com/rails-ecommerce](http://www.agilewebdevelopment.com/rails-ecommerce)
