• Welcome to KonaKart Community Forum. Please login or sign up.
 

how to add product comparision data

Started by ssharma, April 09, 2008, 12:12:04 pm

Previous topic - Next topic

ssharma

hi,
   thanks for new version of konakart. i want to do product comparison and for this konakart added a new "comparison" attribute to the Product object. The purpose of this attribute is to store structured data such as xml that can be used to compare features with other products.

i want to ask is there any pre xml tags are defined or not ?and can u help me for this in detail.

ryan

The idea behind this is that you can store whatever structured data that you want so that you can compare it. e.g.

<?xml version="1.0" encoding="UTF-8"?>
<mobilephone>
   <radio>no</radio>
   <camera>yes</camera>
   <num-colors>65536</num-colors>
</mobilephone>

rula

Hi konakarts,

I searched a long time for a way to handle these xml data in the jsp.
I was very stupid, I ignored jstl and the powerful xml tag library. In the past I only worked with core and fmt tags but for comparison of xml product data this could be very nice. There are many actions (tags) for xml-processing in the jsp. This is only a hint from me for these powerful konakart feature.
regards, rula

rula

Hi konakarts,

I think about a compareProducts page to call from a link in the productDetails page. I will only compare products of the same category, select them from a list with checkboxes, and view the comparison result in a table. I would use methods from the client api to get a array of products by the paticular catgegory. This objects should contain all the information I need to compare them. Is this way okay or how would konakarts do this things? Should I use xml only for the comparison data field or for the whole product object? regards, rula

julie

I'd use XML just for the comparison data so that it is easy to match tags in order to compare features.
The comparison data and description of the product are only populated when you retrieve the product through the API by its id. When an array of products is returned, these attributes aren't automatically populated for performance reasons.

rula

Hi julie,

okay, the user select the product ids and product features from comparison data field can be displayed or
transformed in the jsp, additionally perhaps a image and a detail link. I saw a interesting XmlUtils class with a methode to serialize objects. Could this be relevant for the comparison page? regards, rula

julie

QuoteI saw a interesting XmlUtils class with a methode to serialize objects. Could this be relevant for the comparison page?

The comparison data could be generated by serializing an object if that's what you mean. However in the JSP what you need to do is to parse the XML and display the comparison data that it contains.

rula

Hi julie,
okay, now it's clear, thank you.
regards, rula

rula

Hi konakarts,
here my small product comparison link in productDetails.jsp.
(The first three action dvds with xml dummy data), regards, rula
http://www.ruladev.de/konakart1/SelectProd.do?prodId=11&manufacturer=Warner&category=Action&name=Fire%20Down%20Below&model=DVD-FDBL

Brian

It's coming along nicely Rula!  Thanks for sharing that with us.

--Brian