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.
- This topic has 7 replies, 2 voices, and was last updated 1 month, 3 weeks ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
June 22, 2025 at 1:44 am #668891
codecanyonParticipantWhen 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.June 23, 2025 at 10:18 am #669007
Aizaz Imtiaz AwanKeymasterHello,
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,
June 23, 2025 at 10:47 am #669019
codecanyonParticipantHi,
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
AdamJune 23, 2025 at 3:01 pm #669103
Aizaz Imtiaz AwanKeymasterHello,
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,
June 27, 2025 at 1:30 pm #670035
codecanyonParticipantClass-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?
June 27, 2025 at 2:51 pm #670053
Aizaz Imtiaz AwanKeymasterHello,
Sorry for the inconvenience. Please try to edit this theme file:
inc/modules/search/class-ajax-search.php
Best Regards,
June 27, 2025 at 6:50 pm #670129
codecanyonParticipantThank 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.
June 28, 2025 at 9:33 am #670182
Aizaz Imtiaz AwanKeymasterHello,
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,
-
This topic was modified 1 month, 3 weeks ago by
-
AuthorPosts
- You must be logged in to create new topics. Login / Register