marco-pm / zencart_instantsearch

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

Call for price/sold-out items result in wonky display #35

Closed lat9 closed 6 months ago

lat9 commented 1 year ago

... since their 'price' (as of current zc158/zc200) contains a link to the product's ask-a-question page. Suggest changing these lines https://github.com/marco-pm/zencart_instantsearch/blob/7a832b48ff5b461eefc0abf809cc40540b01c601/includes/classes/ajax/zcAjaxInstantSearch.php#L236-L240

to read

                $dropdownResult['price'] = INSTANT_SEARCH_DROPDOWN_DISPLAY_PRODUCT_PRICE === 'true'
                    ? !empty($result['products_displayed_price'])
                        ? $result['products_displayed_price']
                        : strip_tags(zen_get_products_display_price($id))
                    : '';
marco-pm commented 1 year ago

Maybe I'm missing something, but I don't see where the link is added? In functions_prices.php there are only the OTHER_IMAGE_CALL_FOR_PRICE image and PRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT text.

Also it would be better to just remove the link and not all the html, as this would also remove the formatting for special prices etc.

lat9 commented 1 year ago

I dunno either, all I'm seeing is a broken display on the call-for-price products because there's that anchor-link. FWIW, I'm running on the post-zc158a version of the final zc158 branch.

Agreed on just removing the link-tags instead of all HTML. I should have time next week to go back and see where that link comes from.

marco-pm commented 6 months ago

@lat9 any follow up? Otherwise I think I can close this issue.. thanks

lat9 commented 6 months ago

I guess I didn't have the time. Since no other reports have been made, I'll close this.