This post originated from an RSS feed registered with Python Buzz
by Fabiano Weimar dos Santos.
Original Post: Interesting e-commerce talk
Feed Title: [Xiru].org
Feed URL: http://xiru.org/blog/search_rss?path=/Xiru/blog
Feed Description: [Xiru].org - Fabiano Weimar dos Santos' Website. Usefull information about xiru's projects, Plone and Zope community and Python hacks.
Harder than talk about e-commerce is find somebody that would like to
talk about e-commerce written in Python. However, in a luck day, I had
a very good conversation with Marton Schimcsig (aka nuon,the main
PloneCommerce developer). We talked about a lot of things and It was
a really good conversation.
In a big picture, we talked about some approaches to join eforts
between CMFCommerce and PloneCommerce. In fact, PloneCommerce is a
"wrapper" for CMFCommerce, using Archetypes, but our main goal is not
only improve the solutions. Our main goal is create a new Plone
product, written from scratch and without the actual design mistakes.
Bellow, I'm going to list the main points about our conversation, in
special, the points where we agree and where we still have to think
about good solutions.
A small preface:
Jan 27 12:56:25 <[Xiru]> let me explain one thing before.
Jan 27 12:56:40 <[Xiru]> last friday I send an UML diagram about how I'm thinking...
Jan 27 12:57:03 <[Xiru]> in develop the products on the new version of CMFCommerce
(or whatever name it will be).
Jan 27 12:57:03 <nuon> i don't have a uml tool :I
Jan 27 12:57:22 <[Xiru]> It was not delivered duo the size of the images :-(
Jan 27 12:57:43 <[Xiru]> that's why I was wondering that nobody give me feedback :-(
Jan 27 12:57:56 <[Xiru]> however, you could take a look on http://xiru.org
Jan 27 12:58:00 <[Xiru]> I put the images there.
Jan 27 12:58:09 <[Xiru]> and you will not need a UML tool to read it,
Jan 27 12:58:15 <[Xiru]> heheh
Jan 27 12:58:45 <[Xiru]> About the Order and Shopping cart, I didn't
did the models yet. Let's say that It's a good time to talk about it.
Jan 27 12:58:52 <[Xiru]> what do you think?
Jan 27 13:00:24 <nuon> good time for me to learn uml =)
Jan 27 13:00:34 <[Xiru]> yeap
About how to model e-commerce products:
Jan 27 13:06:02 <nuon> i dream about a different impl :)
Jan 27 13:06:17 <nuon> dunno if it would work...
Jan 27 13:06:33 <[Xiru]> Could you try to explain (or draw it)?
Jan 27 13:06:36 <nuon> let's see the basic color example
Jan 27 13:06:51 <nuon> t shirt in different colors, u can choose
Jan 27 13:07:31 <[Xiru]> It has a good solution on my model
Jan 27 13:07:34 <[Xiru]> let me explain.
Jan 27 13:07:46 <[Xiru]> A TShirt is a Product instance.
Jan 27 13:08:07 <[Xiru]> Let's say that the shop sells 3 diferent sizes of tshirt.
Jan 27 13:08:09 <nuon> by creating a TShirtColorVariant class and
schema, it would be possible to read the other values than the
color, from the parent object, the product itself
Jan 27 13:08:26 <[Xiru]> no.
Jan 27 13:08:30 <[Xiru]> let me explain.
Jan 27 13:08:31 <nuon> why
Jan 27 13:09:03 <[Xiru]> I what to avoid create new classes for
situations like that. My model with be resonable...
Jan 27 13:09:11 <[Xiru]> it works on that way:
Jan 27 13:09:21 <[Xiru]> tshirt is a product instance.
Jan 27 13:09:42 <[Xiru]> if you have, let's say, small, medium and large tshirts
Jan 27 13:09:49 <[Xiru]> with 5 diferent collors
Jan 27 13:09:58 <[Xiru]> and 2 diferent prices, you could
Jan 27 13:10:13 <[Xiru]> configure it on the SKU and attrbutes instances
Jan 27 13:10:17 <[Xiru]> inside the product
Jan 27 13:10:32 <nuon> for 100000 products?
Jan 27 13:10:37 <nuon> ok later ;)
Jan 27 13:10:46 <[Xiru]> e.g., you could create a product tshirt and inside it two SKU
Jan 27 13:11:00 <[Xiru]> each SKU will have a unique number (code) and a price.
Jan 27 13:11:15 <[Xiru]> inside each SKU, you describe what are the attributes
Jan 27 13:11:36 <[Xiru]> in the first you could put color = [white, black, yellow]
Jan 27 13:11:37 <nuon> like the unique properties in cmfcommerce with additional price "field"?
Jan 27 13:11:47 <[Xiru]> yeap...
Jan 27 13:11:51 <[Xiru]> more or less...
Jan 27 13:12:06 <[Xiru]> you could have diferent prices for diferent combinations of attributes
Jan 27 13:12:07 <nuon> in a list?
Jan 27 13:12:15 <[Xiru]> CMFCommerce does not do it today.
Jan 27 13:12:26 <[Xiru]> yeap. the attributes will be a list
Jan 27 13:12:52 <[Xiru]> you could have 25 diferent colors with the
same price, but when the size is "extra large" the price changes.
Jan 27 13:12:59 <[Xiru]> so... we have another SKU.
Jan 27 13:13:04 <[Xiru]> did you got it?
Jan 27 13:13:31 <nuon> isnt it too complicated to access and
manipulate the exact product version from other places (eg cart,
order, stock mngmt, etc)?
Jan 27 13:13:41 <[Xiru]> no
Jan 27 13:13:56 <[Xiru]> I already have it implemented (the shopping cart and order part)
Jan 27 13:14:09 <[Xiru]> what a customer buy is a SKU, not a product
About the Shopping Cart:
Jan 27 14:44:09 <nuon> class IExtendedShoppingCart(Base):
Jan 27 14:44:17 <nuon> The main idea is store the prices and taxes on the
Jan 27 14:44:17 <nuon> shopping cart to avoid inconsistence between the actual product
Jan 27 14:44:18 <nuon> price and tax with the price and tax on the order date.
Jan 27 14:44:34 <[Xiru]> yeap. good thing to take a look.
Jan 27 14:44:42 <[Xiru]> I talked about it in the mail list, remember.
Jan 27 14:44:44 <nuon> the Order should save the props, not the ShoppingCart
Jan 27 14:44:47 <nuon> yep
Jan 27 14:45:02 <[Xiru]> weellll
Jan 27 14:45:08 <[Xiru]> That's a big nighmare.
Jan 27 14:45:16 <nuon> why
Jan 27 14:45:25 <nuon> it's simple
Jan 27 14:45:34 <[Xiru]> I wrote that ExtendedShoppingCart to correct the ShoppingCart mistakes.
Jan 27 14:45:57 <[Xiru]> It puts a price and taxes associated with the SKU (not the product)
that the customer is buying.
Jan 27 14:46:08 <[Xiru]> do you think that It is simple? really?
Jan 27 14:46:33 <[Xiru]> I take 1 week to explain it to Dorneles, a co-worker at x3ng.
Jan 27 14:46:35 <[Xiru]> :-)
Jan 27 14:47:18 <nuon> i havent finished this..
Jan 27 14:47:20 <[Xiru]> I'm planning in the rewrite, put address information associated with
the item (ala amazon).
Jan 27 14:47:38 <[Xiru]> It will make things a bit complicated, but much more interesting.
Jan 27 14:47:59 <nuon> is it trivial to the end user?
Jan 27 14:48:06 <[Xiru]> yeap
Jan 27 14:48:29 <[Xiru]> the end user will not know that It will exists. It's hidden for the final users.
Jan 27 14:48:52 <[Xiru]> They will not have a way to make diference between a ShoppingCart
and a ExtendedShopping Cart.
Jan 27 14:49:10 <[Xiru]> the interface between them are compatible, but the Extended is not mutable,
Jan 27 14:49:24 <[Xiru]> you could not change the content of the object after store it.
Jan 27 14:49:41 <[Xiru]> at least not without program in the CMFCommerce source code :-)
Jan 27 14:50:43 <nuon> and what if the customer phones the shop to pls send me black,
not white and not now, but two weeks later?
Jan 27 14:51:02 <nuon> shouldn't managers be able to change it?
Jan 27 14:52:03 <[Xiru]> hummm
Jan 27 14:52:07 <[Xiru]> good point.
Jan 27 14:52:29 <[Xiru]> gotcha.
Jan 27 14:52:53 <[Xiru]> weelll
Jan 27 14:53:21 <[Xiru]> the main idea is good, but instead of not have the setters, a more
restrictive permission set should be better.
Jan 27 14:54:09 <nuon> removing ModifyPortalContent from Owner should do it?
Jan 27 14:54:52 <nuon> and if it's paid by credit card, the price should not be changed..
Jan 27 14:56:11 <[Xiru]> now I see why you talked about workflow for shopping cart.
Jan 27 14:56:23 <[Xiru]> all very very very interesting point
Jan 27 14:56:36 <[Xiru]> why I didn't tought about it before?
Jan 27 14:57:01 <nuon> it was in CMFCommerce/TODO by sindei :)
Jan 27 14:58:15 <nuon> i want to extend it to handle the total agreement between business partners
Jan 27 14:58:21 <nuon> that will be a nightmare ;)
Jan 27 14:58:32 <[Xiru]> hehehe
Jan 27 14:58:34 <[Xiru]> I agree.
About Address Informations and the Order model:
Jan 27 15:35:12 <nuon> i think i will be able to fork this
Jan 27 15:35:25 <nuon> now i store shipping and payment infos in customer fodler
Jan 27 15:37:06 <nuon> problem is, that now account tool should return an object to
prefill the form with
Jan 27 15:37:08 <[Xiru]> hummm. I would like to store it in the order. each order could have
diferent informations about shipping and billing.
Jan 27 15:37:19 <[Xiru]> put it on member folder is not a good idea.
Jan 27 15:37:38 <nuon> and if i get the info from other small objects, it cant render these skins
Jan 27 15:38:12 <[Xiru]> you could put it in member folder as a preference address, but each
order must store a copy of the address in the time of the
customer bought the product.
Jan 27 15:39:12 <nuon> yesyes!
Jan 27 15:39:50 <[Xiru]> ;-)
Jan 27 15:39:54 <nuon> :)
Jan 27 15:40:15 <nuon> btw users set them up in the cart, right?
Jan 27 15:40:38 <[Xiru]> no. Address are informed during the checkout process.
Jan 27 15:41:21 <[Xiru]> I don't know how I will do it yet because of the new idea of put
address associated with the items, but It will be on checkout UI.
Jan 27 15:43:06 <nuon> i saved my home address to order pizza, but now i want it to the office,
should i replace my default home address?
Jan 27 15:43:43 <[Xiru]> no.
Jan 27 15:44:01 <[Xiru]> we should keep clear to the users a way to define the address preferences.
Jan 27 15:44:23 <[Xiru]> on checkout they will choose what address will be used to deliver the
order and so on.
Jan 27 15:44:35 <[Xiru]> preferences and the orders are diferent things, IMHO.
Jan 27 15:44:42 <nuon> if we copy the address obj to the cart, users can set it up
Jan 27 15:44:48 <nuon> yep, different
Jan 27 15:45:48 <[Xiru]> not to cart, to the order ;-)
Jan 27 15:45:58 <[Xiru]> the cart is only a list of SKU, remember.
Jan 27 15:46:06 <[Xiru]> the order is a much more complex type
Jan 27 15:46:21 <[Xiru]> with the cart, address info, shipping info, payment info...
Jan 27 15:46:54 <nuon> if i've saved my office address, i can't go back to buy some juice?
Jan 27 15:47:25 <[Xiru]> until you not confirm the order, you could do whatever you want.
Jan 27 15:47:42 <[Xiru]> after confirm (in the end of checkout), no more changes are acceptable.,
About multiple Shipping Informations in one Order:
Jan 27 15:58:20 <nuon> shipping info instances for each item?
Jan 27 15:58:27 <nuon> do we really need this?
Jan 27 15:58:29 <[Xiru]> sorry for the "superficial" answers here. I'm a bit busy.
Jan 27 15:58:39 <[Xiru]> sometimes It's needed.
Jan 27 15:58:57 <[Xiru]> think in a wending list.
Jan 27 15:59:05 <[Xiru]> or better...
Jan 27 15:59:27 <nuon> splitting the shoppingcart into shippable chunks?
Jan 27 15:59:27 <[Xiru]> in a big christmas order where you bought gifts for all your familly
Jan 27 15:59:35 <[Xiru]> not sure.
Jan 27 16:00:05 <[Xiru]> maybe it could be harder than think in a good interface to inform this
information in the cheout process.
Jan 27 16:00:28 <[Xiru]> split was a lalo idea. I don't love it ;-|
Jan 27 16:00:52 <[Xiru]> I would like to have a unique order number to give to the customer.
Jan 27 16:01:02 <[Xiru]> not a set of splitted order numbers.
Jan 27 16:01:29 <[Xiru]> nuon: you do only hard questions, inded ;-)
Jan 27 16:01:31 <[Xiru]> heheh
Jan 27 16:01:32 <nuon> i want unique order number for cross db compatibility
Jan 27 16:01:41 <[Xiru]> me too.
Jan 27 16:01:42 <nuon> i have to move the orders to the intranet server..
Jan 27 16:01:57 <[Xiru]> that's why I see the split idea with some concerns.
Taxes management:
Jan 27 17:27:54 <nuon> site manager can define a default sku with no props and more skus for
attributes within the same object, right?
Jan 27 17:28:28 <[Xiru]> yeap.
Jan 27 17:29:01 <nuon> pff... too much :)
Jan 27 17:29:10 <[Xiru]> pff?
Jan 27 17:29:13 <nuon> ok taxmanager probably doesn't use sku
Jan 27 17:29:29 <[Xiru]> wrong.
Jan 27 17:29:41 <[Xiru]> the taxmanager will use sku
Jan 27 17:29:56 <[Xiru]> It's another historical error on taxmanager from actual cmfcommerce
Jan 27 17:30:17 <[Xiru]> if a website sells book and cds, the books are without taxes
and the cds are with taxes.
Jan 27 17:30:34 <nuon> the tax % depends here on something more like the type
Jan 27 17:30:35 <[Xiru]> actually, the tax manager is by State.
Jan 27 17:30:45 <nuon> us only
Jan 27 17:31:15 <[Xiru]> yeap, but in us you will the cds x books case too.