Just wondering if it's possible to configure the search box to search for key words in the description as well and not just titles.
Thanks
Store search box - search descriptions as well
-
- Posts: 82
- Joined: Sun Mar 14, 2021 9:28 pm
- Has thanked: 9 times
- Been thanked: 2 times
-
- PhoenixCart Developer
- Posts: 1211
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
- Has thanked: 38 times
- Been thanked: 103 times
Re: Store search box - search descriptions as well
Make a copy of the search module template file and put it in the override template folder.
Then change line 2 in this copy to:
Note that the code is still the old version. In future updates you should modernize it following the core module coding. It will look similar like in the advanced search page line 86:
Then change line 2 in this copy to:
Code: Select all
<?= tep_draw_form('quick_find', tep_href_link('advanced_search_result.php', '', $GLOBALS['request_type'], false), 'get', '') . tep_draw_hidden_field('search_in_description', '1') . tep_hide_session_id(); ?>
Code: Select all
<?= (new Form('advanced_search', $Linker->build('advanced_search_result.php', [], false), 'get', ['onsubmit' => 'return check_form(this);']))->hide_session_id()->hide('search_in_description', '1') ?>
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
- Posts: 82
- Joined: Sun Mar 14, 2021 9:28 pm
- Has thanked: 9 times
- Been thanked: 2 times
Re: Store search box - search descriptions as well
@raiwa
Do you mean this file to change: includes/modules/boxes/templates/tpl_bm_search.php
Also do I put this file here: templates/override/includes ?
Thanks
Do you mean this file to change: includes/modules/boxes/templates/tpl_bm_search.php
Also do I put this file here: templates/override/includes ?
Thanks
-
- PhoenixCart Developer
- Posts: 1211
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
- Has thanked: 38 times
- Been thanked: 103 times
Re: Store search box - search descriptions as well
I was referring to the header module.
In the box module it's even easier. The code is already in: bm_search.php
line 19 change to:
As it's the main module, you can't use a copy in templates/override. Change the original file, it's just a setting.
In the box module it's even easier. The code is already in: bm_search.php
line 19 change to:
Code: Select all
$form->hide_session_id()->hide('search_in_description', '1');
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27