Google site search… show product pictures in results?
-
23-08-2019 - |
Question
Google offers a search feature you can embed into your web page as the search feature for your page, I want to use it for an e-commerce site. but I want to be able to show pictures of the products in the results if they search for a product. Has anyone ever used Google site search? Is there a way to do that?
Solution
I did this with mnogosearch. The trick there was to get the search results as XML and then build the HTML server-side from the results (inserting the image links). You could do something similar with Googles results HTML either server-side or client-side Javascript DOM traversal).
OTHER TIPS
Here's some psudeo code: You could use javascript or jQuery to read the url in the link and figure out if it's pointing to a specific product (maybe the product number is in the url) parse that out and send a AJAX request to a page that will send page the path to the product image then display that with the search result.