Timeline for Woocommerce Multisite global search how to mod ajax function?
Current License: CC BY-SA 4.0
27 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 20, 2020 at 10:53 | comment | added | Watch Teller | @VitoSantimone try and error few scenario and changes your solution for "if you search the noexist keyword or phrase for both site OR either site, would you ajax shown two (2) "No Product Found" OR shown one (1) "No Product Found". Not worked. Hope you free to check my theme provided file. Which line should I to add your solution (code). | |
May 20, 2020 at 8:59 | comment | added | Watch Teller | @VitoSantimone Thanks! will test it. | |
May 20, 2020 at 6:41 | comment | added | Vito Santimone | solution is simply! $blog_id1 = get_current_blog_id(); if ( !$wp_query->have_posts() ) { if ($blog_id1==1) { $no1=1; } if ($blog_id1==2) { $no2=2; } } // wp_reset_postdata(); restore_current_blog(); endforeach; woocommerce_product_loop_end(); do_action( 'woocommerce_after_shop_loop' ); if (($no1==1) & ($no2==2)) { do_action( 'woocommerce_no_products_found' ); } | |
May 20, 2020 at 6:24 | comment | added | Watch Teller | @VitoSantimone if you search the noexist keyword or phrase for both site OR either site, would you ajax shown two (2) "No Product Found" OR shown one (1) "No Product Found"? | |
May 19, 2020 at 16:49 | comment | added | Watch Teller | Wow! look like you expert in WooCommerce. ^.^ | |
May 19, 2020 at 16:22 | comment | added | Vito Santimone | i just posted another question here, with a partial solution wordpress.stackexchange.com/questions/367042/… | |
May 19, 2020 at 16:04 | comment | added | Watch Teller | @VitoSantimone Your solution worked for me with my minor changes. Now I am same situation with you (the search page - press ENTER, the normal search is not show multisite), i am digging deep inside to find solution. | |
May 19, 2020 at 3:40 | comment | added | Watch Teller | @VitoSantimone As my knowledge, the normal search need to go after the search page template with has the pagination function. I will also check your issue at the same time. | |
May 19, 2020 at 3:37 | comment | added | Watch Teller | @VitoSantimone will testing your posted solution. And, will check your issue for you. | |
May 18, 2020 at 10:10 | comment | added | Vito Santimone | the problem now is that ajax is perfect! But if i press ENTER no results...normal search is not multisite...any ideas? | |
May 18, 2020 at 8:14 | comment | added | Vito Santimone | I just posted my solution and it works! As you can see i deleted foreach couse i had 2 sites...but with foreach is same thing! | |
May 17, 2020 at 9:48 | comment | added | Watch Teller | @VitoSantimone Really.... really..... appreciated! I had tested its many scenario... But no luck. >.< | |
May 17, 2020 at 9:41 | comment | added | Vito Santimone | Sorry for delay! Monday i will post perfect functionant PHP! | |
May 16, 2020 at 10:39 | comment | added | Watch Teller | @VitoSantimone Need you help! | |
May 15, 2020 at 19:14 | comment | added | Watch Teller | @VitoSantimone I tried, but i cannot make it work, may be i edit it in wrong line in the code. Can you post your answer? Thanks in advance! | |
May 15, 2020 at 16:56 | comment | added | Watch Teller | Hi @VitoSantimone, I lost..... ^.^ to make me more understand it, you can post your answer (edit you code with solution) for me to follow. Thousand Thanks! | |
May 15, 2020 at 16:41 | comment | added | Vito Santimone | This is the working solution, you need to merge 2 arrays to work! So after cycle forach just: $my_array1 = array('suggestions' => $suggestions); $my_array2 = array('suggestions' => $suggestions1); $res = array_merge($my_array1, $my_array2); echo json_encode($res); | |
May 15, 2020 at 16:11 | comment | added | Watch Teller | Thanks for hint up! will try it. ^.^ | |
May 15, 2020 at 15:43 | comment | added | Vito Santimone | i found problem! is in that lines echo json_encode( array( 'suggestions' => $suggestions1 ) ); infact, i deleted cycle foreach and manually added blog 1 and blog 2. so 2 suggestions, but only one can work! So solution is to make suggestions work for the other site! | |
May 15, 2020 at 15:24 | comment | added | Vito Santimone | @WhatchTeller me too!! | |
May 15, 2020 at 15:11 | comment | added | Watch Teller | @VitoSantimone Noted, I haven't stop trying and error, to found the solution for me and you too. Thanks! keep in touch. | |
May 15, 2020 at 15:05 | comment | added | Vito Santimone | yes if i remove site 1 site 2 only works...the function exit on DIE() there's the problem. On cycle forach when it reach die() function ends to work...but without does not work | |
May 15, 2020 at 11:43 | history | edited | Watch Teller | CC BY-SA 4.0 |
typo error
|
May 15, 2020 at 11:03 | comment | added | Watch Teller | Hi I tried, if I remove the blog_id 1, the site1 can ajax search the site2, but the search page (press ENTER, but never click the ajax search result) remained the same site. | |
May 15, 2020 at 10:50 | comment | added | Watch Teller | If I remove the blog_id 1, the site1 can search the site2. | |
May 15, 2020 at 10:37 | review | First posts | |||
May 15, 2020 at 13:55 | |||||
May 15, 2020 at 10:36 | history | answered | Watch Teller | CC BY-SA 4.0 |