My current project is working in drupal. I know that may sound strange as this website and many things I’ve written here are about wordpress. But this is my reality at this point. Now I and my spearhead (Describes who takes the bulk of the work [A term I and mostly only I will use]) ran into an issue. The issue was simple and yet complicated…
A client had many many products, a definitive amount, though it will be expanded over time. Those products generally acted under the same rules with some minor variations. However, an important variation was the graphical art the consumer will see. A simplified yet ugly diagram can be scene like this
Product:{ Sizes:{ Big:{ Head:{white, black, grey, color} BodyType:{ Expensive:{ CustomizationLevel:{ Full Custom:[type1] Kinda Custom:[type1] Basic Custom:[type1] None:[type1] } } Moderate:{ CustomizationLevel:{ Full Custom:[type1,type2,type3] Kinda Custom:[type1,type2,type3] Basic Custom:[type1,type2,type3] None:[type1,type2,type3] } } Cheap:{ CustomizationLevel:{ Full Custom:[type1,type2,type3] Kinda Custom:[type1,type2] Basic Custom:[type1,type2] None:[type1,type2,type3] } } } } Medium:{ Head:{white, black, grey} BodyType{ Expensive:{ CustomizationLevel:{ Full Custom:[type1,type2,type3] Kinda Custom:[type1] Basic Custom:[type1] None:[type1,type2,type3] } } Moderate:{ CustomizationLevel:{ Full Custom:[type1,type2,type3] Kinda Custom:[type1,] Basic Custom:[type1,type2,type3] None:[type1] } } Cheap:{ CustomizationLevel:{ Full Custom:[type1,type2,type3] Kinda Custom:[type1,type2,type3] Basic Custom:[type1,type2] None:[type1,type2,type3] } } } } Small:{ Head:{ grey, color} BodyType:{ Expensive:{ CustomizationLevel:{ Full Custom:[type1] Kinda Custom:[type1] Basic Custom:[type1,type2] None:[type1] } } Moderate:{ CustomizationLevel:{ Full Custom:[type1,type2,type3] Kinda Custom:[type1] Basic Custom:[type1,type2,type3] None:[type1] } } Cheap:{ CustomizationLevel:{ Full Custom:[type1,type2] Kinda Custom:[type1,type2,type3] Basic Custom:[type1,type2] None:[type1,type2,type3] } } } } Robotic:{ Head:{white, black, grey, color} BodyType:{ Expensive1:[Glow-in-the-dark,Customized,less exp] Expensive2:[Glow-in-the-dark,Customized,less exp] } } } }
Now, we originally tried to make everything as simple as possible by making 3 products with different customization levels and exception
Product{ Size:Integer Heads:[] Body:{ Expensive:[] Moderate:[] Cheap:[] } }
However, we found in drupal, using DropDown Attributes did not like what we were doing. We ended up having to make many more attributes because we could not make the parent decide which values to show, only the child that was depending on the parent. As a result, we end up essentially making 50+ attributes. And on top of that have to hack in some ugly functionality as well as the client being extremely limited with the possibility of confusion being extremely high.
Now, this makes me question, why didn’t we just make 50+ products instead? The faceted search form would be extremely similar. In addition, taxonomies can have dependencies as well. However, do not have the opportunity to start coming back in time, but I know have a very interesting philosophical question: How different is Searching from Customization?
If we take a look at how customization works, we have a couple expectations
- What ever is changed, changes a net value (such as money)
- It is pointless to make duplicate products when two are so similar
- Any duplicate may clutter search results
- duplicates may not be able to be seen easily
So essentially the two main reasons why customization is superior is User Experience and functionality with a net cost. This makes perfect sense. Now lets consider what would happen if we use taxonomies.
Size:Integer
Head:[String] Enum[black,white,grey,color]
-Dependent on Size
BodyType:[String] Enum:[Expensive,Medium,Cheap]
-Dependent on Size
CustomizationLevel:[String] Enum:[Full,Kinda,Basic,None]
-Dependent on Body Type
Now what would end up happening is we create whatever number of products the client wants to sell, however, the much of the diagram work is out of the way. Now with taxonomies, we can make a products price dependent on the taxonomy at hand. However, we wold still end up making thousands of products. This wouldn’t be a bad thing is we could automate it though because at the end of the day there are two very important concepts
- The type is truly what everything is dependent on. If there is a proper file structure with types, we can make proper taxonomies
- The heads are generic and can be repeated (or be a customization)
This essentially reduces the expected work divide by 4 because heads can be considered generic. In addition, because we know what folders the types are from, we can easily add the appropiate taxanomies.
Does this answer the question?
Not quite. And yet it does. Essentially our “products” are really 2 nodes. 1 being very generic the other being able to be catagorized. Yes. The answer is unfortunately a mix is needed. However, this leads into a bigger question…
What if the head and bodytype are limited to a subset that can be catagorized?
The most important part here to consider is…
- When an Object has multiple independent parts, each of these should be considered a customization aspect
- When an Object has an enumerated tag, this can be considered searchable
- When an Object has an undefined number that will be enumerated. That should be your axis.
This “axis” concept is where most of your work will be put in. It will also be where your client will be doing most of their stuff on. Sure, maybe the client will add onto customization levels, maybe it will add another color. But probably not. As a result, Types are where you want them to enjoy 90% of the time in.