yourownfriend Posted July 20, 2007 Share Posted July 20, 2007 Hi everybody I have this little problem, it seems easy but I've been thinking about it for days on a better more effective solution. Maybe you can help. I'll go step by step so you can understand. PROBLEM I have a table with 4 columns where I'm showing 900 products, each product in it's own row The first column has the name of the product, that is coming from our database. The next 2 columns are ratings for each product, These ratings are gathered from 2 different external web pages. The reason that this rating are being grabbed from an external page it's because they change and are updated on a daily basis at their respective site. The last column is a final rating we give to each product based on a calculation of the 2 previous columns. The main idea is that the information updates automatically as the external sites do. The problem is matching the data for each product. Let me give you an example of the table _______________________________________________________________________________ product | rating from site 1 | rating from site 2 | TOTAL RATING --------------------------------------------------------------------------------------------------------------------- 1 2 900 2 6 54 3 8 1 ... Here I'm showing the order of the products, ours goes 1.2,3, etc and is not the same as the rest, even though each site has the same amount of products, the order on which they are shown are not the same so it's hard to match. One of the sites has this list on XML, so what I did is I created a dynamic table and then created an xslt fragment and then created a repeating area with the rating information, it works great and I can adjust the order of the products on our site according to this one but then the other one is the one that doesn't match. I don't know how I can somehow make a relation of the products between our site and the external sources so that data will show where it should. We keep in our database the Name of each product and an ID that we designate A1,A2,A3 ...A900. We have access to the the id each of the 2 sites give to the products it looks something like this: _______________________________________________________________________________ product | My ID | Site x | site y | site z ---------------------------------------------------------------------------------------------------------------------------------------------- Bananas | AA1 | x001 | adbf87 | a87g9sbd4 ---------------------------------------------------------------------------------------------------------------------------------------------- Oranges | AA2 | x598 | adfb1 | 5fhg7lbj4 ---------------------------------------------------------------------------------------------------------------------------------------------- Apples | AA3 | x008 | adfb554 | 8fgfdsbd4 ---------------------------------------------------------------------------------------------------------------------------------------------- any ideas? please. Quote Link to comment Share on other sites More sharing options...
benjaminbeazy Posted July 20, 2007 Share Posted July 20, 2007 what exactly are you looking for? Quote Link to comment Share on other sites More sharing options...
yourownfriend Posted July 20, 2007 Author Share Posted July 20, 2007 what I'm looking for is a way to match the data for each product by an id maybe? what I've been doing is storing the list of ids for each products from each side, so I they are all stored in our database. For example for the rating from one site is being grabbed from an xml file, and on our side I'm showing a repeat xsl fragment but what I need to place each product under the right name. So for example if in their xml list the 1st item is Apples and in my list Apples is the 11th item, it should go to the 11th place. Help please Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.