Well, we don´t have to persuade each other that it is easy to ask for something but harder to put it into reality. Everyone who had already created something will understand.
Somewhere before in this thread I responded on information that together with Benoit you´re looking for „the best way“ to implement product variants into the Store module. This is the topic we should discuss. More heads – more brain power :-)
In the beginning of my comments I would like to emphasize that it is very important to clarify where do we want to get with the development of the module. Is it supposed to be a simple online shop or a complex tool for selling, managing the stock and relations with the customers? In my opinion, we should concentrate on the simple online store plan and concentrate on the means of presentation of the goods and services to the customer.
Gilles, from the catastrophic description you noted before emerges an important question: Do we want to create a new module? ... :-) (just joking) No, we don´t! (Pity, many things would have become much easier...) Let´s maintain the existing Store module and let´s think about how to get into it the product variants at the current conditions. The basic role of the product in the Store module won´t be changed, that means that we can think of the product variants as of attributes or properties of the product.
We need then a separate system, which allows us to define and manage attributes of the products. No problem: new db tables and some new webcontrols included in the Admin module - done. User has the possibility to define any number of any attributes for his products. For each attribute he can assign any number of any values. Now it is necessary to assign the attributes along with their values to the particular product. Attributes can be assigned to one product or to a group of products (for example according to category). Various combinations of assignments are possible, it all depends on fantasy and will to work. After assigning to the particular product it is certainly suitable to have the possibility to define other product-specific properties, for example a surcharge (price modifier) to the price and so on. More ideas are welcome.
Let´s summarize: We can define the product attributes, we can define the values of the attributes, we can assign the attributes to particular products and for concrete assignments we can define specific features as for example the price modifier. All of this can be put into practice without any significant change of the existing system.
Another challenge is the presentation of the attributes in the product catalogue. Who had looked on the existing code suspects that this would be more „fun“. As a basis I would choose table output. Attribute with one value will have a text representation and multiple values can be displayed using the DropDownList control. This output we can put into the existing template system by implementing a new token using the current infrastructure. With more tokens more ideas can be put into practice.
What do to with the existing attributes as is e.g. ProductWidth, ProductHeight, Weight and so on? Why not make use of the existing infrastructure? Into the attribute value can be written an already defined token and it is done. It is possible and it works.
Behind this line follows only a complicated work of integration of the new part of the system into the existing code. These changes apply to all parts of the existing solution. This is because we implement the attributes of the product and in the Store module, products are everywhere. About this, in case you are interested, later.