Here's basically what I have... the thing with t-shirts is that you can have a base product, the design... and it's got several subproducts  Medium Black shirts, Large black shirts, Meidum blue.  And they've all got different prices attributed to them, like an XXL shirt would be a little more expensive than a XL shirt.  For shipping and such, each shirt (or item) needs a weight associated with it.  Since I used shirts and they typically come in different, generic, reusable types like Jerseys 50/50 Heavyweight, I abstracted that away... anyway, here's a very basic idea of what my model system looks like, its what I came up with doing this site in PHP for a few years and I cleaned it up a lot for Django, it works suprisingly well and is pretty generic, although I can see how it might need some extra stuff depending on what's being sold.

Item
-- short_name(slug)
-- long_name(char)
-- active(bool)

Sub_Item
-- Item(foriegn)
-- Color(foriegn)
-- Size (foriegn)
-- Type (foriegn) # what kind of shirt is it?
-- unit_price (float)
-- num_in_stock (int)

Color
-- name (char)  # something like "Black"
-- html_equivilant (char)  # something like #000000

Size
-- short_name # like "S"
-- long_name # like "Small"

Type
-- name # like "Jerseys 100% Cotton Large"
-- weight (float) # I use it in pounds.  so it's usually something like 0.23

I also have Image and Coupon models along with some helpful methods in the Image models for doing thumbnails and stuff that I needed to develope when doing my templates.  Anyway, I've got a basic shopping cart about 60% of the way done and my shirt_detail views and stuff, showing stock matrices and stuff.

I'd be happy to share anything I've come up with to help this project out!


On 4/14/06, Jeremy Jones < [EMAIL PROTECTED]> wrote:

On Fri, 14 Apr 2006 22:15:31 +1200
Michael < [EMAIL PROTECTED]> wrote:

> http://dshop.mine.nu/shop
>
> working now to setup trac
>
>
> > Michael
> >
>
>

I just put up what I've coded so far on
http://jeremy.pitterpatprints.com/

I just created that subdomain, so it's not in the DNS for work yet, but
it is from home.  I don't have a shopping cart built in there yet.
Another question is whether to allow products from multiple stores to
populate the same shopping cart instance.  I'd think not.

Anyway, this site is butt-ugly.  Nothing like the one Michael has put
up, but I hope it gets across some of my intentions.

- jmj







--
---
Clint Ecker
[EMAIL PROTECTED]
http://phaedo.cx
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to