imloic
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Woo Search] Critical error when search a referenceOk problem with this snippet
/** * resultat recherche par prix decroissant */ add_filter( 'aws_search_results_products', 'my_aws_search_results_products' ); function my_aws_search_results_products( $products ) { usort($products, function ($item1, $item2) { $a = intval( $item1['f_price'] * 100 ); $b = intval( $item2['f_price'] * 100 ); if ($a == $b) { return 0; } return ($a > $b) ? -1 : 1; }); return $products; }
I would like to show Highest price first and I’m not sure of this. But this work for
return ($a > $b) ? -1 : 1; }); return $products; }
- This reply was modified 1 year, 8 months ago by imloic.
Forum: Plugins
In reply to: [Advanced Woo Search] Critical error when search a referenceEDIT: OK. The problem is from a snippet. Error when I hit “enter” when I search PLT PRO. So I remove all snippets and it’s WORK! No error on this REF
Please check these 2 captures, it’s very strange,Second capture, I see stock and I don’t see the brand (so my snippet doesn’t work ??)
Forum: Plugins
In reply to: [Advanced Woo Search] Ignore space in the search barDo you have more info please ?
Forum: Plugins
In reply to: [Advanced Woo Search] show out of stock custom fields onlyPerfect! I just adapted the code for WPML. Work well. I hope I don’t make errors.
add_filter('aws_search_pre_filter_single_product', 'my_aws_search_pre_filter_single_product', 10, 3); function my_aws_search_pre_filter_single_product( $new_result, $post_id, $product ) { ? ? if ( $new_result['stock_status']['status'] ) { ? ? ? ? $new_result['stock_status'] = ''; ? ? } else { if(ICL_LANGUAGE_CODE == 'en'){ ? ? ? ? $new_result['stock_status']['text'] = 'Discontinued product'; } if(ICL_LANGUAGE_CODE == 'fr'){ ? ? ? ? $new_result['stock_status']['text'] = 'Produit arrêté'; } } ? ? return $new_result; }
Forum: Plugins
In reply to: [Advanced Woo Search] show out of stock custom fields onlyYou’re right! It was on “HIDE”. It’s OK but it’s possible to show “Discontinued product” instead of “Out of Stock”?
Thanks
Forum: Plugins
In reply to: [Advanced Woo Search] show out of stock custom fields onlyThe search wheel doesn’t work and when I hit enter I got this message :
https://kinsta.com/wp-content/uploads/2021/05/wordpress-critical-error.png
Forum: Plugins
In reply to: [Advanced Woo Search] show out of stock custom fields onlyFucntion.php. Correctly edited when I press UPDATE.
Forum: Plugins
In reply to: [Advanced Woo Search] show out of stock custom fields onlyHello, file (function.php)was edited successfully but this doesn’t work. WordPress says: “There was a critical error on this site”.I can’t search for a product.
- This reply was modified 1 year, 9 months ago by imloic.
Forum: Plugins
In reply to: [Advanced Woo Search] Ignore space in the search barI tried all snippets. TRIO 290 is a child.
Forum: Plugins
In reply to: [Advanced Woo Search] Ignore space in the search barYes ! I try all snippets. TRIO 290 is a child
Forum: Plugins
In reply to: [Advanced Woo Search] Ignore space in the search barHello ! The search for products is done via the category names
You can try on HITMUSIC.EU
TRIO290 -> NOTHING
TRIO 290 -> the categories appear.I would like to see the category TRIO 290 when I type TRIO290.
Thx. Otherwise the plugin is great. Congratulations for your work!
Forum: Plugins
In reply to: [Advanced Woo Search] Ignore space in the search barJust to be precise, I want it to work for a category name and not just the product name. For the product name the code works fine!
Forum: Plugins
In reply to: [Advanced Woo Search] Ignore space in the search barHi ! This code don’t work too. Sorry
Forum: Plugins
In reply to: [Advanced Woo Search] Critical error + WPMLIt seems to work. Thx
Forum: Plugins
In reply to: [Advanced Woo Search] Ignore space in the search barYes sir ! and I even reindexed the table