marco-pm / zencart_instantsearch

Instant Search plugin for Zen Cart
GNU General Public License v3.0
2 stars 4 forks source link

Image alt/title text should be item's name not image-name #34

Closed lat9 closed 1 year ago

lat9 commented 1 year ago

When the instant search brings up matching items, the alt/title text for the image is the name of the image, not the name of the item. Suggest changing these lines https://github.com/marco-pm/zencart_instantsearch/blob/7a832b48ff5b461eefc0abf809cc40540b01c601/includes/classes/ajax/zcAjaxInstantSearch.php#L281-L283

to

            $dropdownResult['img'] = INSTANT_SEARCH_DROPDOWN_DISPLAY_IMAGE === 'true' && !empty($img)
                ? zen_image(DIR_WS_IMAGES . strip_tags($img), strip_tags($name), INSTANT_SEARCH_DROPDOWN_IMAGE_WIDTH, INSTANT_SEARCH_DROPDOWN_IMAGE_HEIGHT)
                : '';
marco-pm commented 1 year ago

Thanks @lat9!