Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Questions with plugin
- This topic has 7 replies, 2 voices, and was last updated 4 years, 4 months ago by
Ernest Marcinko.
-
AuthorPosts
-
January 25, 2022 at 12:34 pm #36389
soyoo06
ParticipantHello, I have a few questions regarding the use of the plugin for a WooCommerce store:
1. I have enabled to search in the SKU product field (https://prnt.sc/26j2ed5) but it doesn’t seem to work (https://prnt.sc/26j2erq – https://prnt.sc/26j2f3t)
2. I have enabled to search in the ‘dimension’ attribute(https://prnt.sc/26j2fn5) but it doesn’t seem to work (https://prnt.sc/26j2gjh – https://prnt.sc/26j2gpc)
3. By the way, this attribute defines the product size (e.g. ‘2 x 3’) but users often search it without the space characters (e.g. ‘2×3’). How to also search in the attributes without taking spaces in account?
4. When users press the search button, I would like to redirect them to a specific url (https://bachesmfm.wpengine.com/boutique/?_recherche=<search query>) instead of the WooCommerce default search page. How to do this?
5. How to change the size of these 2 borders to set them to 1px: https://prnt.sc/26j2h46 ?
The site url is https://bachesmfm.wpengine.com
January 25, 2022 at 9:37 pm #36400Ernest Marcinko
KeymasterHi,
1 & 2. It is caused by a known minor bug with the title/content filters. Whenever one is unchecked, the index table ignores the other fields (treats the checkboxes in an exclusive matter). To resolve this, simply set the second filter to checked as well: https://i.imgur.com/QcCBCo8.png
3. I am not sure if there is a simple solution to this. If the spaces were to be removed during indexing, the whole text would become a single long string, or if the phrase needs to have spaces added, then there is no way to determine where and for what criteria add the spaces.
Maybe using a custom code to change the ” x ” character with spaces to “x” before indexing could help.Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
add_filter( 'asp_indexing_string_pre_process', 'asp_change_the_string', 10, 1 ); function asp_change_the_string( $raw_str ) { return str_replace(' x ', 'x', $raw_str); }After adding this, make sure to re-create the index table: https://i.imgur.com/cTrR9ps.png
If all goes well, it should have some effect.
4. You can change that here: https://documentation.ajaxsearchpro.com/behavior/return-key-and-magnifier-icon-click-actions
5. Those are not actually borders, but a margin and padding, you can reduce that via this custom CSS:
p.showmore { margin: 1px 0 0 !important; } .asp_r { padding: 1px !important; }January 26, 2022 at 8:10 am #36406soyoo06
ParticipantThanks for the support!
1&2: Ok so I also had to hide the settings to search in title and description on the front end or it wasn’t working neither. Can you fix this bug in the next version of the plugin?
3: Thanks for sharing the custom code. How can I change it to remove space only in pa_dimensions attributes and not in titles, descriptions, etc when indexing?
I have also two additional questions:
6. How to change the text and color of this label: https://prnt.sc/26jgpdv ?
7. Is it possible to collapse/expand the child taxonomy items: https://prnt.sc/26jgpq7 ? It would be easier if only the parent categories would be displayed and clicking on them would show the children (like in a tree view element).
Thanks!
January 27, 2022 at 10:32 am #36419Ernest Marcinko
KeymasterHi again,
1 & 2. Of course.
3. Try maybe something like this:
add_filter( 'asp_index_terms', 'asp_change_the_string', 10, 2 ); function asp_change_the_string( $terms, $taxonomy ) { if ( $taxonomy == 'pa_dimensions' ) { foreach ( $terms as &$term ) { $term = str_replace(' x ', 'x', $term); } } return $terms; }6. Via this option: https://i.imgur.com/AQzcCQf.png
7. Only when they are checked/unchecked, they can be collapsed automatically: https://i.imgur.com/rASFTTE.png
January 27, 2022 at 11:04 am #36420soyoo06
Participant3. Thanks it works!
Another question:
8. How to change this text: https://prnt.sc/26k2qmv ? (I’d like to convert it to French but I don’t want to have to install loco translate just for this)Thanks!
January 27, 2022 at 11:14 am #36421Ernest Marcinko
KeymasterYou are welcome!
You can change those here: https://i.imgur.com/N7NXewu.png
January 27, 2022 at 11:18 am #36422soyoo06
ParticipantThanks, all good now, you can close the ticket 🙂
January 27, 2022 at 12:26 pm #36427Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts
- The topic ‘Questions with plugin’ is closed to new replies.