-
-
Hello – I just discovered that I can no longer search for orders in the backend of the store. If I go to Woocommerce>Orders and enter any search (customer name, order number, etc.) in the search box and hit “search orders” it returns with “no results found”. What is even more odd, if I delete the previous search term (while still in the “no results found” screen) and type in a new term and search, I am taken out of Orders and sent to Products (still with “no results found”).
I am unsure how this is related to Tower since it is happening within the Woocommerce plugin, but I have tested the site, and the issue resolves itself if I switch to another theme.
Your site/login credentials are updated in my profile and the staging site is up to date as of right now, and available for you to dig around in.
-
Hi,
Yes, I have checked it is not working and again bit complex issue, I will update you again on it.Thanks,
-
Rebccaolson,
I can confirm this issue is arising due to your custom scripting. Please check on your end.Thanks,
-
Azam – Can you clarify what custom scripting is causing the issue? I’m not a developer, so anything custom in my scripting has come from Tower in response to other bugs/issues in the theme.
-
Rebeccaolson,
Yes, Custom Scripting You have done or your Developer and Those are not relted to Tower Bugs / issues.Thanks,
-
Can you clarify *which* “custom scripting” you are referring to? I do not have a developer, so anything custom in my site has come from Tower to help address bugs/issues as they’ve come up over the years. Perhaps it isn’t necessary anymore, if you were able to fix it on the staging site – so I’m happy to remove the custom scripting that is causing the conflict, if you tell me what it is.
-
Rebecca,
Your child theme has a custom scripting and you were working yourself.
This is not our code.Thanks,
-
This must have been from long ago when the site was set up. All I’m asking if you can tell me which custom scripting is causing the conflict? Or do you not know?
-
Azam – I just deleted the entirety of the code in Tower-child CSS, and the issue still exists. Is the issue with something in the functions.php file? Or something else? I’d rather not delete everything in my Child Theme, if it’s just one thing causing the glitch.
I’ve spent hours going over all the code in my live site Child Theme, comparing it to the code in the staging site Child Theme, and I cannot find the difference. Can you please tell me what you changed/removed to make the staging site function? If you could please just point me in the right direction, I would be very grateful.
-
This reply was modified 4 years, 7 months ago by
rebeccaolson.
-
This reply was modified 4 years, 7 months ago by
-
Rebeccaolson,
In child theme in our theme there is no search.php but you theme is having.
Our Tower > Child themes’s function.php file consist only few lines but
and compare it with this one.This were code is conflicting and I am not sure your some plug-in or some developer added extra codes.
I hope you understand the situtiono better now, I have to spent 2 hours approximately to find out exact piece of code which is creating an issue.
How I did, I just added default function.php and tested your order search coming smoothly.
Thanks,
-
Azam – so just to clarify: Is it the search.php or function.php file that is causing the issue? Or both?
You are saying you don’t know which code in the file is causing the malfunction, and I need to delete the entire child theme function.php file and start over from scratch?
-
it is functions.php code that is causing the problem in tower child theme.
-
Hi Rebecca,
I found out on functions.php of the child-theme that you have added a filter when querying products. I have added a custom code, so this piece of extra code will not be run on the admin dashboard.
I am pretty sure that this code was not added by us.
Please check now.Thanks
-
Also, can you send me the extended support item license purchase code as a private reply?
Thank You
-
Ludjon – thank you for your help, but unfortunately that didn’t work either. I still was not able to search backend Woocommerce orders.
I definitely didn’t expect you to spend the time to write new code for me! I was just hoping someone could tell me what code I needed to remove (or have someone take a look at) that was causing the theme to malfunction. Since I now know that it was the search code (trying to filter results to show only products, not blog posts,) that was causing the issue, I have simply removed that code from functions.php and the site is operating again.
Here is the code that was causing the issue below, in case anyone runs across this thread in the future:
//Only show products in the front-end search results
function lw_search_filter_pages($query) {
if ($query->is_search) {
$query->set(‘post_type’, ‘product’);
$query->set( ‘wc_query’, ‘product_query’ );
}
return $query;
}Thanks!
Rebecca -
-
You must be logged in to reply to this topic.