Click here to register.
      
irc://irc.freenode.net#webgui

iPhoneGuy: WebGUI is a pile of crap.
rizen: If WebGUI is such a pile of crap, why do you use it?
iPhoneGuy: Because it's the best pile of crap out there.

If this is what people who hate us are saying, imagine what people who love us will say. Come join us on IRC.


     C2: WebGUI::Product to WebGUI::Asset::Sku::Product > Re: C2: WebGUI::Product to WebGUI::Asset::Sku::Product

C2: WebGUI::Product to WebGUI::Asset::Sku::Product

User colink
Date 4/11/2008 11:46 am
Views 746
Rating 0    Rate [
|
]
Previous · Next
User Message
colink

I've finished analyzing the WebGUI::Product and WebGUI::Operation::ProductManager and am ready to start moving that code over to WG::Asset::Sku::Product.

I think the original design is very functional and elegant; the only criticism I have is that it's hard to setup many similar items (like lots of t-shirts with different designs as individual products).  Moving to Assets, where you can create prototypes, will fix that.

So my plan is just to add a screen to WG::Asset::Sku::Product that allows you to add parameters and options, and then another screen to configure variants.  This last will initially only allow for enabling or disabling individual variants in a product, but eventually I can see where this would be the inventory management screen for that product.

Does anyone see any flaws or problems with this, or alternately, am I missing an opportunity to do something really good by following this route?



Back to Top
Rate [
|
]
 
 
JT

The only thing I can think of is that if you store the variants as a property of the product in a JSON blob, then the variants will be versioned with the product, but more importantly, will cary with the product for the purposes of "prototyping" and "packaging".



Back to Top
Rate [
|
]
 
 
colink

Those are two big advantages, but if variants were used for inventory control, then every inventory change would be another version in the db.

Well, unless we stored inventory someplace else.  But then when the packages are imported you'd have to interface with the inventory system.

In AssetPackage I see the beginning of hooks for handling Asset collateral data.  But that wouldn't help with Prototypes.



Back to Top
Rate [
|
]
 
 
JT
And what is the problem with that? Plus you must be forgetting about the update method. 

JT
On Apr 12, 2008, at 6:48 PM, <ckuskie@sterlink.net> wrote:

colink wrote:

Those are two big advantages, but if variants were used for inventory control, then every inventory change would be another version in the db.

Well, unless we stored inventory someplace else.  But then when the packages are imported you'd have to interface with the inventory system.

In AssetPackage I see the beginning of hooks for handling Asset collateral data.  But that wouldn't help with Prototypes.



http://www.plainblack.com/webgui/dev/discuss/c2-webguiproduct-to-webguiassetskuproduct/2


--

Plain Black&#44; makers of WebGUI
http://plainblack.com


Back to Top
Rate [
|
]
 
 
colink
On Saturday 12 April 2008, jt@plainblack.com wrote:
>
>  And what is the problem with that? Plus you must be forgetting about the update method. 

I did :)

Let me tell you what I'm thinking so you can tell me what's wrong
with it.

The current ProductManager has three tables (names are paraphrased):

parameters (stored per Product)
parameterOptions (stored per Product and parameter)
variations (stored per Product, parameter and parameterOption)

The number of variations is equal to the product of
parameters * parameterOptions.  Each variation is tracked
independently because they can be individually enabled
and disabled.  For example, you may have size (big and small)
and color (red and blue).  If you sell out of small, red
widgets, you can disable that variation and not be hounded
by requests for things you can't deliver.

You probably already knew all that.

The parameters and parameterOptions map nicely into a set of hashed
arrays.

{
   'size' => [
       'big' => {
           priceModifier => ??,
           weightModifier => ??,
       },
       'small' => {
           priceModifier => ??,
           weightModifier => ??,
       }
   ],
   'color' => [
       'red' => {
           priceModifier => ??,
           weightModifier => ??,
       },
       'blue' => {
           priceModifier => ??,
           weightModifier => ??,
       }
   ],
}

variations need to be mapped differently:

{
   'size:big;color:red' => {
       enabled => 1,
       identifier => 'guidGUIDguidGUIDguid00', #Used for inventory control
       compositePriceModifier => sum of individual price modifiers,
       compositeWeightModifier => sum of individual weight modifiers,
   },

   'size:big;color:blue' => {
       enabled => 1,
       identifier => 'guidGUIDguidGUIDguid01'
       compositePriceModifier =>
       compositeWeightModifier =>
   },

   'size:small;color:red' => {
       enabled => 1,
       identifier => 'guidGUIDguidGUIDguid10' #Used for inventory control
       compositePriceModifier =>
       compositeWeightModifier =>
   },

   'size:small;color:blue' => {
       enabled => 1,
       identifier => 'guidGUIDguidGUIDguid11' #Used for inventory control
       compositePriceModifier =>
       compositeWeightModifier =>
   },
}

For generating inventory reports, I think it would be easier to keep
the inventory in a separate db, which is why I added the identifier
in the JSON.  Otherwise, the inventory field could be right in
the JSON, too.

I think I've just convinced myself that it's fine.

Colin




Back to Top
Rate [
|
]
 
 
JT

I'm not suggesting that you store it all in the same field, I'm just suggesting that you use json blobs to store it. You could have one field for the parameters and options. Another that is the list of exclusions. Another that is the inventory list, etc. Then join those together in code at render time.



Back to Top
Rate [
|
]
 
 

Re: Duplicate web site by bartjol - Sun @ 01:21pm

YouSendIt like app. by pvanthony - Sun @ 09:33am

Smoketest For nightly_2008-07-20 by Visitor - Sun @ 01:37am

Smoketest For nightly_2008-07-19 by Visitor - Sat @ 01:38am

Re: Survey2 by perlmonkey2 - Fri @ 05:36pm

Smoketest For nightly_2008-07-18 by Visitor - Fri @ 01:39am

Re: Building WRE for Fedora Core 4 x86_64 by neodymiumex - Thu @ 02:59pm

Tracking file downloads in WebGUI by colink - Thu @ 02:00pm

Smoketest For nightly_2008-07-17 by Visitor - Thu @ 01:39am

Re: Survey2 by perlmonkey2 - Wed @ 11:05pm

Re: Survey2 by patspam - Wed @ 08:05pm

Re: Survey2 by perlmonkey2 - Wed @ 03:41pm

Re: Duplicate web site by techwriter - Wed @ 09:07am

Re: Limiting the size of avatars by bernd - Wed @ 03:45am

Smoketest For nightly_2008-07-16 by Visitor - Wed @ 01:38am