prmr / Creco

Recommendation System for Consumer Products
Apache License 2.0
6 stars 2 forks source link

Image thumbnail for the products displayed to the user #91

Closed mangalagb closed 10 years ago

mangalagb commented 10 years ago
mangalagb commented 10 years ago

Now, the image thumbnail can be accessed via getImageThumbnail() method. I have parsed out cases that do not contain a valid image. This method needs to be called from the frontend to actually display it in the UI.

mangalagb commented 10 years ago

I have added the thumbnails for products that have images. But since a lot of them do not have thumbnails, it looks a bit odd. I will add a default image to those products.

enewe101 commented 10 years ago

Hey @mangalagb, I had a default no image already, so we can just use that (I added it back on the master branch -- see how I used thymeleaf if/unless pair).

BTW, there is a bug in firefox when reloading products after checking features. I think I know why it's happening... reloading by AJAX does not use the template, so when we make changes to the products template, they aren't reflected in reloaded products. So it is not a problem with your code, but elsewhere. Obviously the AJAX requests and initial load should be handled using the same code... this will have to wait until after the release.

mangalagb commented 10 years ago

I thought about reusing the default image. But I need a fully qualified address for the loading to work (beginning with http://). So I thought I'l use a default that is present in the consumerReports website.

mangalagb commented 10 years ago

I just replaced the default image to reflect the one used by the official consumer reports no image thumbnail.

enewe101 commented 10 years ago

Hey @mangalagb we still have that bug I pointed to earlier. Here is how to reproduce it:

So I guess we can use the CR no-image file if you really prefer. (Actually, I prefer like the way it looks.) It does have their logo in it though, but not a huge deal...

mangalagb commented 10 years ago

I have fixed the error. It was due to a faulty image url being passed in the toaster class.

mangalagb commented 10 years ago

This bug occurs in chrome browser too and not just for toaster class but for other classes as well. So I agree with you to keep this issue open.

mangalagb commented 10 years ago

Fixed the bug and pushed to master

asutcl commented 10 years ago

I merged master into tmp-master and fixed a few merge conflicts, but now the images disappear again. @mangalagb Could you please take a look at it, I don't know what I could have done. I don't want to merge into master before it is fixed. Thanks!

asutcl commented 10 years ago

I've been looking at this for a while, I've used the compare with feature in Eclipse but I can't seem to find what changed. If someone could point me in the right direction that would be great.

asutcl commented 10 years ago

found it there was a ; that should have been a ,.