Split Woocommerce Site

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 1 year, 7 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #38622
    TKS
    TKS
    Participant

    Hi,

    Our Woocommerce website is split into 2 – Shooting & Fishing.
    We want to be able to limit the search on Shooting to only search through Shooting categories and on Fishing only search through Fishing categories, also to have different result pages so we can apply the correct filters on the page.
    Is this possible ?
    Many thanks

    #38638
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    For the live results, this knowledge bease should help.
    That is a generic solution for when you have multiple categories.

    Having multiple results pages is a bit more complicated, WordPress does not have that feature. You can sort of hack your way around it, either by using the plugin search results shortcode as the custom results page, or using an elementor products widget.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #38700
    TKS
    TKS
    Participant

    Hi Ernest,

    Apologies for the slow reply, your email went into junk and we have only just found it.
    So for limiting the search you recommend adding code to the functions.php which is fine but we need to know exactly what to add/change –
    add_action(‘asp_layout_in_form’, ‘asp_layout_in_form_archive_input’, 10);
    function asp_layout_in_form_archive_input() {
    $taxonomies = ‘category, post_tag, product_cat’; // Enter the taxonomy names here
    We will have two searches so which part do we change to point at the right one ? how are product categories to be separated – air guns, targets, < – is that correct ?

    We are using Elementor Pro as requested by the client, we have two separate headers , two different searches that will be split. We have spent alot of time going through your documentation, but we still cannot work out how to point one search result to one Elementor search page (i.e. fishing and the other shooting)

    Hope that makes sense
    Thanks
    Ross

    #38713
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Ross,

    I’m afraid no, no change is needed on that code. If you are using WooCommerce, then it will automatically do it’s thing on the taxonomy archive page. Note, that that works for archive pages with the live results (not elementor results).

    Might be a bit more simpler to just create two search bars, configure each to return results from that specific category only. Then you can create two elementor pages for the results – one for each search bar.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #38927
    TKS
    TKS
    Participant

    Hi Ernest,

    Thank you for you support.
    We have created specific categories which will work well. However we have an issue with the Elementor ‘Page’ it works fine, but we also use – https://annasta.net/plugins/annasta-woocommerce-product-filters/
    Because we created just a simple page for the search results rather than a ‘search result’ page with Elementor when choosing a filter, it redirects as shown here – https://www.loom.com/share/010c7b1a78b34043ad42b08a99bb1878
    Any ideas on that please?
    P.s. we have contacted Annasta filters and they came back with a rather extensive reply, but we are unsure whether it will work with your plugin, so just querying you first.
    Many thanks
    Ross(NWS)

    • This reply was modified 1 year, 7 months ago by TKS .
    #38938
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Well, combining multiple filter plugins is probably not going to work this way, it is usually not a good idea. Each plugin does it’s own thing, overrides the results etc.., and in the end usually only results from one of them are displayed (as they simply override each other).
    I am not sure if it’s worth trying to make them work together, as fetching results from one and then plugging it to the other to filter is a very difficult task – in most cases not even possible.
    The biggest issue here, is that ajax search pro is instructed to redirect to a page, whereas the other plugin tries to reach the shop page and filter that – which I guess it was made for. And even if that is resolved, I highly doubt combining them will do any good.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.