I have taken a long break from Blogging because of customer commitments but I realized the EVERYONE has the same 24 hours in a day that I have, it's just a matter of how you use it.  I noticed that I have not been using my time to give back to the greater community so here goes.

I am starting a series of catalog design blog posts where I will share different scenarios I have encountered and also share how we solved it.  There is an art to catalog design and you must strike a balance between ease of use for the catalog managers, the back end catalog/item master, the user experience, the reporting/orders/marketing and the UI representation of the data (WOW, do I really need to understand all of these pieces?).. the answer is, as always, it depends.

The scenario:  I did some work for an online beauty product manufacturer where we needed to provide a list of "ingredients" for a given product.  They had a list of ingredients for a product stored in their item master as separate fields for inventory, accounting and other purposes.  They don't sell each individual ingredient (such as water) but they wanted to:

a) show the list on the site for consumers

b) display the ingredient list as a hyperlinks so that they could have a description for the ingredient


Solution:  As part of the catalog load process, we concatenated the list of ingredients using a semi-colon and placed the value in a long-text field.  We also loaded each ingredient with the definition into the product catalog as individual, non-sellable items.  We used the ingredient ID from the back end system as the SKU for the products.

Once we had the catalog loaded, we wrote some code to split the field data into an array (string.split(fielddata)) and added a foreach loop in order to generate the hyperlinks for each ingredient.  This allowed the system to be flexible enough to handle any list of ingredients.

So the product field in catalog manager contained:  water; vitamin E; collagen...

At runtime (pseudo code, not actual code): 

ingredList = product.properties["ingredients"].split(';');

foreach(string s in ingredList)
    link = string.format("<a href=\ingredpopup.aspx?p={0} ...", s);

Scenario:  used the same "pattern" to solve a similar problem when we needed to display a description for a class.  The customer was a sports club and when we displayed the schedule information, each class needed a hyperlink with a popup showing the description. 

Solution: We added the classes as products and when the class list is rendered, we generate a link.

(pseudo code again)

foreach(timeSlot t in timeSlotList)
    string className = timeSlot.ClassName;
    string popUp = string.format("javascript:showPopUp('/classpopup.aspx?p={0}')", className);