Best practice for comparing product specs

Author Message

Eirik Alfstad Johansen

Thursday 01 April 2004 5:10:06 am

Hi,

What's the best way to store specs for products when these are to be compared?

When I recently created a web site for a our web hosting service, I solved the problem by creating one product class and one product spec class. The product spec class attributes were the name of the spec as well as one attribute for the spec value of each product.

This worked fine since there were only 4 "products" (hosting packages) and new products are rarely added. If new products were to be added, however, one would have to edit the product spec class to add a new attribute. Also, there would be no physical relation between the spec and the product, and one would have to edit each product spec object when adding a product to include the value of the product spec for the new product.

Now I have encountered the same problem yet again with a client site, and I'm looking for suggestions/ideas on how to best store product specs for comparison.

Thanks in advance !

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Alex Jones

Monday 05 April 2004 6:57:47 am

I have been struggling with this idea for close to a year now, and sadly I don't have a very good solution. I tried using a modified Matrix datatype, but that is problematic as I cannot change the name of a spec site-wide, nor can I easily change the order of the specs. After various other tests, I have fallen back on standard Text Lines, which isn't a good solution either, as each product can include 15 specs, thus increasing initial content creation, storage space and display time.

I would love to see a solution to the issue.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Eirik Alfstad Johansen

Wednesday 07 April 2004 1:58:56 am

Hi Alex,

<i>I have fallen back on standard Text Lines, which isn't a good solution either[...]</i>

Do you mean that you store them as class attributes?

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Bård Farstad

Wednesday 07 April 2004 2:36:07 am

I think that I would have made a new datatype for this where you define the fields to compare at class level and just fill in the values when you edit the object. When you have this as a separate datatype you could design it so it will be simple to compare different products with different values.

I would not serialize this into xml when storing since it will then be hard to do comparison.

I think a new datatype which is designed for this is the best way. I don't see any existing datatypes really fit into this.

--bård

Documentation: http://ez.no/doc

Alex Jones

Wednesday 07 April 2004 7:31:17 am

Eirik, I do indeed store them as a class attribute which is a Text Line.

Bård, that is a good point. When I set up my first site, which was the one with the large amounts of product specifications I wasn't familiar with the system, so that never ocurred to me. I like your idea and may very well use it with the next site I create.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.