Hi,
for some reason the default woocommerce search doesn’t function properly on our shop so I installed the
Advanced Woo Search. It uses a simple shortcode to render wherever placed [aws_search_form].
When a user makes a search, the results are returned using the default woocommerce category template. I’m happy with this, but when there are no results, an empty page loads, which is bad for user experience and for the sales.
Is it possible and is it an acceptable practice to redirect the visitor to a customized page (a normal wordpress page with its own url) when there are no search results in woocommerce? If yes, how can I do that?
Thanks for your support
OK, I understand that redirecting the woocommerce 404 to a normal wordpress page is not a good practice (as there will be wrong header and this will result in negative SEO), as well as creating unnecessary server request. I hope you will give the most optimized solution.
Thanks
You should ideally make a custom 404 page for your woocommerce area. I think the WooCommerce docs have info on how to do that; or just make a new ‘page’ in your WC store, then add the error 404 link in your .htaccess file.
If you’re asking about how to change a plugin to show something when a plugin-search shows nothing, no idea.
(I don’t work here.)
No worries. WooCommerce is not part of the theme, and generally any ‘customizations’ for Woo have to be done as part of the Woo elements, such as custom template mods, function hooks to change messages on pages, behaviors, etc.
So, Google good place to look, if there is NOT already a custom 404 theme template inside the woocommerce folder within the theme itself (have you looked in there yet?).
E.g.,
I had to customize the heck out of our WooCommerce install end of 2015, so went through the hideous learning curve on how a lot of stuff with Woo should be in the Woo panel but they have cottage industry selling plugins on annual basis, or want you to make custom hooks in a function to change obvious things like “message on the login page” or “remove shipping address on checkout page” which really should be simple on/off stuff in Woo, or at least offered in single “extend Woo” plugin for all the stupid stuff that can’t be done with a theme or in Woo “directly.”
Anyway — just food for thought. Theme itself doesn’t control custom Woo templates, was my point; but you can add over-ride templates by putting them in a woocommerce folder inside the theme.
Woo DOCS:
https://docs.woocommerce.com/document/template-structure/
Hi Chris,
that plugin helps only for the standard 404 page. Doesn’t help.
I would like to create a custom 404 page in the theme options and use it for woocommerce 404 page the proper way.
I really appreciate your efforts to help me, but please don’t respond to my messages and topics. Thanks
Hello,
Sorry but the plugin you use is not tested and I cannot provide any solution for untested plugins. We only tested the standard woocommerce plugin but even so, as Chris suggests, what you want is customization of a plugin. Not theme related. You can hire a freelancer from sites like studio.envato.com if you need customization services as we do not have a customization department.
Thank you!
WooCommerce is a plugin, which is what Bogdan was referring to.
Basically, you might need to create a custom search template and put into the woo template structure, as outlined in their pesky docs for all template over-rides.
https://docs.woocommerce.com/document/template-structure/
Basically Woo templates are part of wooCommerce and NOT the theme, technically. The theme may have WC support and have some custom themes setup to over-ride the default WC theme templates.
So only real options are
a) over-ride the WC search template in the woocommerce plugin folder
b) make custom search template in the THEME, which goes into the THEME woocommerce folder containing WOO over-rides.
A bit confusing. I went through this myself when I needed to add custom messages on the checkout page, order page, login page, etc. — where for some stuff you have to add filters for woo, and in others hard-edit the woo template files.
The simplest thing is likely figure out how to edit the “no search results” message in Woo, as starting point …
such as
Sorry, no results for your search
[click here] to find some better options
or something like that, where the button or click here text would take them to your desired page.
Might not help. But food for thought 🙂
I’ve come out with a solution for the 404 page, even not perfect, because both sections have to use the same menu (and I in fact use 2 different for my needs). Anyway, it seems that I can’t solve the issue myself in a clean way and without a plugin, so I had to installed a wordpress plugin (404page – your smart custom 404 error page), which now handles the 404 page for the magazine and for the shop(woocommerce) section. It uses the same 404 page (custom built using visual composer) for both sections of the site.
Unfortunately there’s an issue with displaying of the products, which are part of its design. You can see here: bit.ly/2wjOiIH
The page contains 1 row which includes a text block and products.
Can you help me to fix this?
Hello,
Sorry Dave but I cannot help with customization as the support policy states: https://forum.tagdiv.com/support-policy-2/
Please hire a freelancer from sites like studio.envato.com if you need modifications made to the default implementation of the theme
Thank you!
It is a customization of the 404 page. The theme does not provide any settings to customize the 404 page beyond these settings: https://www.screencast.com/t/J7JRgaSWU
Thank you!
Hi guys,
Regarding the following: Redirecting the visitor to a customized page (a normal wordpress page with its own url) when there are no search results in woocommerce, while using Advanced Woo Search:
This is the response from the author of the plugin:
https://wordpress.org/support/topic/issue-when-no-results/
Can you help me further?
Thank you
Hi,
Please contact us on our email address at contact@tagdiv.com and provide a link to your site and wp-admin (login information and admin rights) so we can login and investigate. Please also include a link to this conversation.
Thank you!