You are here:  » Images not matching product page


Images not matching product page

Submitted by tisbris on Wed, 2013-05-01 15:12 in

Hello David

I just found out that some times the images shown in the product search doesn't match the image on the product page.

Product search:
http://example.net/search.php?q=costume&log=1

Product:
http://example.net/product/Queen-Of-Hearts-Costume.html

This sample also generates this warning:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in {code saved}/products.php on line 147

Warning: Cannot modify header information - headers already sent by {code saved}html/header.php on line 6

... but this warning only comes on some product with different images.

Do you have any idea of what coursing this behavior?

thx.
Brian

Submitted by support on Wed, 2013-05-01 15:28

Hello Brian,

Search results are generated using a summary query, so whilst the lowest price - derived from the SQL MIN(price) - will always be correct, the product record from which the other fields are selected (e.g. image_url) is undefined - it could be from any merchant for that product. However, for a niche site it would be practical to re-query the search results per product with a price order sort which will ensure that the product image shown on the search results is that of the cheapest merchant, and therefore the same as the one displayed on the product page. If you would like to email me your search.php and products.php I'll make that change for you, and also check out the product page MySQL warning that you seeing on certain pages (which is to do with Related Products)...

Cheers,
David.
--
PriceTapestry.com