Home New Guten Forums WoodMart support forum Ajax search not showing sold status on products it finds.

Ajax search not showing sold status on products it finds.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #668891

    codecanyon
    Participant

    When I do a ajax search – clicking search and typing a string in e.g. “french revolution”, the results do not show the sold badge for relavant items. When I then click enter for a normal search they are shown.

    Is this a bug or have I missed some config somewhere?

    • This topic was modified 1 month, 3 weeks ago by codecanyon.
    Attachments:
    You must be logged in to view attached files.
    #669007

    Hello,

    We’ve tested this on our test site and can confirm the same behavior — the “Sold” badge is not displayed in AJAX search results, but it appears correctly on standard search results pages. This is the default behavior in the Woodmart theme.

    You need to complete the search and click “Show all”, you will get to the search results page, where you can show all the elements.

    The AJAX search result just shows what you are going to get in the search result page.

    Best Regards,

    #669019

    codecanyon
    Participant

    Hi,

    Is there a way to change this so it has the same behaviour as standard search? We hide the prices for sold items, so preferably would like to do this throughout the site.

    Thanks
    Adam

    #669103

    Hello,

    Sorry, there is no option in theme settings to control this. It requires customizatio,n and beyond our support policy.

    You need to edit the theme files for this. All the customizations made in the theme files are at your own risk. inc/modules/header-builder/elements/class-search.php

    Best Regards,

    #670035

    codecanyon
    Participant

    Class-search. Php does not appear to have the code for what is shown on the ajax results screen. Is there another file that is used?

    #670053

    Hello,

    Sorry for the inconvenience. Please try to edit this theme file:
    inc/modules/search/class-ajax-search.php

    Best Regards,

    #670129

    codecanyon
    Participant

    Thank you Aizaz. Couple of options in inc/modules/search/class-ajax-search.php you kindly pointed me to:

    1. Comment out 264 'price' => $product->get_price_html(),
    2. Comment out the If statement on 354 so that ajax search only shows in stock (thus never showing price for out of stock.)

    I have decided to go with option 2.

    Maybe worth in the long term, Xtemos having an option to have independet flag to filter out sold on ajax search.

    #670182

    Hello,

    You’re very welcome! I’m glad you found a solution that works for you.

    Your suggestion about having a dedicated option to filter out sold products in AJAX search is definitely a good one. I recommend submitting it as a feature request here: https://woodmart.canny.io/feature-requests so our development team can consider it for future updates.

    Best Regards,

Viewing 8 posts - 1 through 8 (of 8 total)