I am Danish Shah. I am persuing computer engineering(final year). As i am in final year so me and my group members are developing a sponsored project named as 'Online shopping cart app'.
As we are in intial stage so we are trying to find out logics which will be required to fulfill all features of app.
m here just want to know there is a compare section in every online selling site.
so just want to know the exact logic behind it..
let it be more clear..
if m viewing a product and i add it to compare so the same products from different merchants are supposed to be fetched from database and shold be listed on the screen as it happens in every site.
question is that on the basis of what the same products will be selected to get compared with the choosen product means what will decide that this product is similar to the choosen one and it should be fetched.i am not getting the logic so it will be very helpful if any one can help.

You decide that. You take a property from the selected item eg weight or category. And search your database for items with the same property. So if you select a black shoe we can use the "black" property to search our database and give you other black shoes from different designers. You can choose as many properties as you like