bobwaycott
unread,Feb 6, 2009, 1:28:34 PM2/6/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Satchmo developers
Chris,
Thanks for the response. It's great to hear some of the thinking
behind Satchmo's current design.
Regarding model inheritance, I completely understand why it's not
currently implemented and don't fault Satchmo on that. But I do think
it could be an improvement for the community to look at and work
together on implementing.
Regarding options and variants, I, again, completely understand the
intention behind each variant being an "inventoried" item as it
currently operates. In fact, Satchmo is great on that front. In fact,
that is one strength it holds over one of our largest online
retailers' current shop (10,000+ products with >5 options each), who
often would like to be able to merchandise certain variant products
alone, rather than them only showing up as an option to a product.
However, for sanity's sake, I think variants really should be kept
separate from the base product table. The one verifiable proof I have
for this is what currently happens in the Satchmo templates -- after I
create a couple of variations, I notice that all the variations and
the product they descend from show in a list at /products/ . . . but
clicking on any of them brings me to the parent product's detail page,
with all variants in a drop-down box. I'm sure there's a way to filter
out the variants from the /products/ list (I haven't yet looked into
it), but it still strikes me as a counterintuitive behavior.
While I'm new to the Satchmo community, I hope you'll indulge me with
my own suggestion of how product data could be more sanely managed,
while providing a maximum of custom flexibility for the developers who
pick it up for their clients.
class Product
=============
product_id
site
name
slug
sku
price
[price_intl] ???
short_description
description
category
[vendor/brand] ???
items_in_stock
meta
date_added
active
featured
ordering
related items
taxable
taxClass
shipclass
You'll notice I've removed a lot of information that we currently have
tied to the base product class in Satchmo. That's because all that
width/height/length/weight stuff strikes me as non-base information.
Those are specifications of a particular kind of physical product for
which those properties are meaningful. In my thinking, those should be
left to a separate model of say:
class PhysicalSpecifications
============================
weight
weight_units
length
length_units
width
width_units
height
height_units
volume
volume_units
etc.
Separating these physical specifications into a separate model means
that we developers could include them as inlines for our
CUSTOM_PRODUCT_MODULES that subclass Product. Either way, I don't
think we should default to that being considered basic information,
since so many products can be sold in a store that either don't have
those physical specifications, or for which they are meaningless (say,
I'm selling packs of DVDs ... both the customer and the shop owner
aren't very concerned with how wide, long, or high the pack is).
Weight is arguably important for calculating shipping, but even that
is often determined on a store-by-store basis (for example, my client
charges 0 shipping on everything except international air mail) and
keeping that information as a separate specifcation looked up via
ForeignKey would not limit shipping calculations. What would probably
be even better would be a dual group/item setup like we currently have
for Options -- say, SpecificationGroups and Specifications. We could
then create custom groups of specifications of all name/value pairs
for any type of product characteristic, then include them again as
inlines to our own custom products where necessary. So we could create
a group for physical specs for products where that information is
meaningful, another group for computer specifications, or anything
else.
To my mind, Options should be handled the same way, via ForeignKey
references that tie them to a product and get pulled into templates in
that fashion. We can create OptionGroups and Options, but they are
immediately usable as such, not requiring the step of creating
variations that are saved to the product table as currently
implemented. For our largest retailer, we have a very versatile
options setup that handles things this way:
class ProductOption
===================
product_option_id
product_id (ForeignKey)
price
items_in_stock
etc.
This client is a large outdoor equipment/clothing retailer and sell a
jacket, for example, in multiple colors. We actually track inventory
at the Option level, and decrement accordingly at each purchase. Of
course, this may just be more meaningful for this client because we
also manage a three-tiered fulfillment setup:
1. Client fulfills customer orders from warehouse inventory
2. Vendor/Manufacturer drop ships each customer order
3. Client fulfills customer orders from warehouse inventory until 0,
then orders automatically routed to Vendor for drop shipment
Thus, whenever a customer orders a product, we check what fulfillment
that product is assigned to. If it's 1 or 3, we decrement option
quantity. If it is #2, we don't bother with product/option inventory
at all. When we are looking at items_in_stock, if that field is NULL
at the product level, we then look to the options. Items are always
purchased as a product_id + product_option_id combo, so essentially,
inventory logic is always tied to the Options.
Admittedly, this could provide a problem for instances like our
present client for whom we are using Satchmo. There aren't any options
available for a product, but we have a need for PriceOptions. Perhaps
this could even be handled along the lines of Options and
Specifications -- we could have PriceGroups and PriceOptions, or
something similar that would handle selling the same custom product at
multiple price levels that would not have anything at all to do with
quantity ordered -- which strikes me as the realm of Discounts. Of
course, the more simple a base Product class is, the easier it is to
inherit that Product model and make my custom products do what I want
them to do.
We could expand Satchmo's notions of Discounts to be quantity aware,
not just apply as a discount code. Perhaps the easiest way to
implement this is to add a quantity field to Discounts, and let
"automatic discounts" actually be automatic -- don't require a
customer to input a Discount code if it is automatic. Advertise the
discount in whatever way is sensible, but actually automatically apply
it when conditions are met and the item is added to the cart.
Now, about Product Variations -- the way Satchmo implements this is
really quite analogous to how we handle master/slave/normal products
for our largest retailer. That jacket I mentioned before? Well, really
it's a line of jackets, and they change every season. But each new
seasonal addition to the line also has it's own specific options
(like, what are this season's colors?). The option set is always the
same across each variation, but specific only to that variation. These
are added to the base product table, of course, but they also have a
master/slave relationship like so:
product_id = 10998, [various columns], master_product_id = 36
It *seems* like Satchmo is aware of where variations are descended
from, we just make it explicit in our product table. So, in our
scenario, we have MasterProducts, SlaveProducts, and NormalProducts
(the default, where master_product_id = product_id). The only rule
here is that a SlaveProduct cannot have children, and by extension, a
MasterProduct cannot become a SlaveProduct. Just a little sanity to
ensure we don't end up with a client accidentally setting Product A as
the parent of B, and C as the parent of A or child of B later.
I could be way off on that mark, but Satchmo's handling of Variations
just feel that way to me, which still brings me back to understanding
variants to be different from options, not a descendant of them, as
Satchmo currently implements them. Variants seems much more like the
"new model" of some product, whereas options are the red, blue, green,
and yellow colors available.
I hope I haven't lost anybody or myself in any of this. I further hope
I'm not proposing any conception that is drastically more difficult to
manage.