Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #843395

    Hi,

    I realized, that after activating a shop main page with layout builder the search of products with URLs like:
    /?s=trvb&post_type=product
    does not work any more. It Shows the shop main page, instead of serach results.

    In my opinion the ENFOLD filter
    add_filter( 'pre_get_posts', 'avia_woocommerce_default_page' );
    does always show the shop main page, also in this case of product searching calls.

    My temporary solution is to deactivate this filter, but I think the Code should also evaluate whether the call is a search or not.

    Regards,
    Michael

    #843402

    Hi,
    the above mentioned solution does not realy work, since the shop main page, created with the layout builder will Show the woocommerce Default products at the end of the page and therefor destroys the layout.

    So I deleted my Code to remove the filter againg and changed the theme’s source Code within function avia_woocommerce_fefault_page to add the last if condition:

    if(!$query->is_admin && $query->is_main_query() && !$query->is_tax && $query->is_archive && $query->is_post_type_archive
        //added!
       && !$_REQUEST['s']
    )

    Hopefully you can see my Problem and help with a solution in the next theme update.

    Thank you in advance,
    Regards,
    Michael

    • This reply was modified 7 years, 2 months ago by zwachm.
    #844941

    Hi,

    That is something we have never been reported before.
    Can you please try help us identify the issue as much as possible?
    How is it happening, what is not working, as much details as possible please

    Best regards,
    Basilis

    #845197

    Hi Basilis,

    ok, I will try to summarize it again:
    – my shop main page is designed with the advanced layout builder
    (it seems, that on some places in ENFOLD codes, this makes a difference, since de
    Default woocommerce query is stopped and replaced with the layout code)
    – in my opionin the Default search URI for woocommerce product search is like this: /?s=trvb&post_type=product

    This does not work in my Environment and Shows the shop main page insted.

    My conclusion was, that ENFOLD replaces the Default query of the shop main page, which is used
    in woocommerce also to get the result for the search.

    Does it help and is my assumption correct? If so, it should easily be able to get reproduced on another System…

    Regards,
    Michael

    #847517

    Hi,

    Are you using the Woocommerce Product Search widget? Please provide a link to the shop page.

    The “avia_woocommerce_default_page” function will no be executed unless you enable the “avia_custom_shop_page” support which we don’t recommend because a lot of the default product features doesn’t work well with it. Did you enable the “avia_custom_shop_page”? Do you have the following code in the functions.php file?

    add_theme_support('avia_custom_shop_page');
    

    Best regards,
    Ismael

    #848456

    Hi Ismael,

    yes, the
    add_theme_support( 'avia_custom_shop_page' );
    is active, since I have to use the layout editor for the shop main page.

    Since my above mentioned correction is active, you will not see the described fault at the Moment.

    Please find the Login account within the private section.

    Regards,
    Michael

    #848930

    Hi,

    Thank you for the info. Is the modification working correctly? We will report the issue to Kriesi. For now, you can extract the whole “avia_woocommerce_default_page” function and put it in the child theme’s functions.php file.

    Best regards,
    Ismael

    #849397

    Hi,

    thank you for your Suggestion. after adding the filter
    add_filter( 'pre_get_posts', 'avia_woocommerce_default_page' );
    too it worked.

    Please tell me whether you or Kriesi will give me a notice, if they have corrected the issue in the next update?

    Regards,
    Michael

    #849487

    Hi,

    We have reported the issue to Kriesi. We’ll give you an update if it’s going to be included in the latest patch. You’re the only user who reported the issue so we are not aware of it until now.

    Best regards,
    Ismael

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.