sergio79
Forum Replies Created
-
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Strange problem with WP Grid BuilderIn fact it depended on the number of minimum characters, I had set it to 3 … and my search was “3.00”, thinking they were 4, but with the substitution of the comma character, evidently they are considered 3. I lowered it to 2, and now works. Strange though that “Relevanssi Live Ajax Search” ignored the minimum number of characters I had set in Relevanssi…
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Strange problem with WP Grid BuilderThis is the response from their technical support… it is still not clear how with “Relevanssi Live Ajax Search” everything works normally, and with WP Grid it doesn’t…
“This behavior depends on Relevanssi settings, such as the minimum word length and decimal separators.
When you set Relevanssi as the search engine in the facet settings, it is Relevanssi that queries posts, and the search strings depend on Relevanssi settings.”Forum: Plugins
In reply to: [Relevanssi - A Better Search] Strange problem with WP Grid BuilderSure:
add_filter('relevanssi_remove_punctuation', 'rlv_keep_brackets_1', 9); function rlv_keep_brackets_1($a) { $a = str_replace( '/', 'slashSubst', $a ); $a = str_replace( '-', 'minusSubst', $a ); $a = str_replace( ',', 'commaSubst', $a ); return $a; } add_filter('relevanssi_remove_punctuation', 'rlv_keep_brackets_2', 11); function rlv_keep_brackets_2($a) { $a = str_replace('slashSubst', '/', $a); $a = str_replace('minusSubst', '-', $a); $a = str_replace('commaSubst', ',', $a); return $a; }- This reply was modified 2 years, 6 months ago by sergio79.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Strange problem with WP Grid BuilderWpGrid’s response:
“About the comma/dot, this only depends on the Relevanssi engine and not WP Grid Builder.” … 🙁Forum: Plugins
In reply to: [Relevanssi - A Better Search] Strange problem with WP Grid BuilderOkay I’ll try to write to them … it’s weird though because I’m sure WpGrid uses Relevanssi for search because it finds me articles indexed by SKU (which WP search would not do). I also noticed that besides not finding these results with special characters (handled with relevanssi_remove_punctuation), all the results have cmq a different order, compared to what “Relevanssi Live Ajax Search” finds …
Forum: Plugins
In reply to: [WP STAGING - WordPress Backup, Restore & Migration] Problem with WP 6.4?Nice! Thanks!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Duplicated resultsDear Mikko, you offer splendid support by having a plugin in even free version, WP Grid Builder offers non-existent support, and also costs several euros/year. Just think that every (and I’m not kidding) ticket I opened, I was answered that what I want to do is not provided…
- This reply was modified 2 years, 8 months ago by sergio79.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Duplicated resultsNo in admin I don’t have duplicates. However, I don’t know if it is the same thing because WP Grid builder (https://docs.wpgridbuilder.com/resources/faq-compability/#does-it-work-with-relevanssi) when selecting a facet of type “search field” allows the selection of the engine (and thus I chose Relevanssi), while when the search is done with a dropdown of taxonomies, an AJAX query is sent like ?wpgb-ajax=refresh&_shop_brands=spark … in this case it is not specified if it uses Relevanssi or not…
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Disable auto-index, schedule indexAwesome!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Disable auto-index, schedule indexOk perfect, last question, with the relevanssi_build_index function is the index deleted and re-created, or are only the posts not yet indexed indexed? Thanks so much!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Disable auto-index, schedule indexThanks so much for the reply, it seems like a super valid solution.
I would like to schedule indexing every 3 hours, is there a log or is it possible to know the date of the last indexing so as to check if the cron is working correctly?Forum: Plugins
In reply to: [WooCommerce] Cart/Order create 2 rows for the same productHi Shameem, Thanks again for your support.
The method I used is still working without major problems.
The big problem at first was figuring out that methods like WC()->cart->add_to_cart inside a function called by hook like “woocommerce_add_to_cart” produced a loop.
For that reason I thought of modifying the “cart_contents” directly… 🙂
Thanks again!Forum: Plugins
In reply to: [WooCommerce] Cart/Order create 2 rows for the same productHi Shameem, First of all, thank you for your explanation.
In the meantime, I set out to create my own PHP “plugin” to do what I needed, and I succeeded. My approach though was different and I would like your opinion, as the main action instead of acting on the woocommerce_add_cart_item hook I used woocommerce_add_to_cart like this:
// save the car" and cart_contents global $woocommerce; $cart = $woocommerce->cart; $cartContents=$cart->cart_contents; // I perform my checks, if it is necessary to split the product into 2 entities I do this: // I remove to cart all cart items referring to my product_id foreach ($cart->cart_contents as $cart_item_key => $cart_item) { if ($cart_item['product_id'] == $product_id) { unset($cartContents[$cart_item_key]); } } // I set my "new" product's cart data, starting with the product entered from woocommerce: $myNewProd= $cartContents[$cart_item_key]; $cartContents[$cart_item_key] = $myNewProd; // if I need to create the duplicate product where to enter the remaining quantities $cartContents[$cart_item_key.'-cloned'] = $myNewProd; // finally, I update the cart WC()->cart->set_cart_contents($cartContents); WC()->cart->set_session();Obviously there is a lot of other code to do other checks, but it was unnecessary to put them, my logic was this. Using woocommerce_add_cart_item instead would have saved me some steps? Using woocommerce_add_to_cart could I do “damage” of some kind?
Thank you very much for your support!
- This reply was modified 2 years, 10 months ago by sergio79.
OK thanks, in any case I await the intervention of other users who may have solved the problem in some way.
Perfect! Works! Thanks very much!