Product Search Issues - by sitelabs - on WordPress WooCommerce support

This topic has 9 replies, 3 voices, and was last updated 7 years, 6 months ago ago by Laranz

  • Avatar: sitelabs
    sitelabs
    Participant
    June 22, 2017 at 16:49

    I’m seeing some issues when trying to search for products, using certain phrases.

    E.g. we have a product ‘Brand’ called ‘By the Sea’. When I type this into the search box, products do start to appear, using the AJAX search (see attachment).

    However, if I hit enter or click the search icon, the products don’t show up. E.g. https://chefstableware.co.uk/?s=by+the+sea&post_type=product

    What’s interesting is that if I use the following search query, it seems to work: https://chefstableware.co.uk/?s=by+the+s&post_type=product

    NOTE: I’ve checked the error logs an I’m seeing a lot of errors relating to killded queries.
    I’m not sure if this is related.

    [Thu Jun 22 00:00:15.705244 2017] [:error] [pid 18423] [client xxx.xxx.xxx.xxx:19412] KILLED QUERY (28353 characters long generated in [theme_location]/legenda/attachment.php:35): SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (637,672,673,674,675,676,677,698,711,715,717,719,721,728,730,732,734,763,800,809,812,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985 etc etc etc …

    8 Answers
    Avatar: sitelabs
    sitelabs
    Participant
    June 22, 2017 at 16:51

    Screenshot

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 23, 2017 at 14:51

    Hello,

    Could you please provide wp-admin access in Private Content?

    Regards,
    Rose Tyler.

    Avatar: sitelabs
    sitelabs
    Participant
    June 23, 2017 at 14:54

    Sure 🙂

    Please, contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 23, 2017 at 15:04

    Hello,

    I’ve created search page and set https://prnt.sc/fnajy3. Please check search now.

    Regards,
    Rose Tyler.

    Avatar: sitelabs
    sitelabs
    Participant
    June 23, 2017 at 15:14

    Still a few issues:

    The search results only show 3 results: https://chefstableware.co.uk/search/?search=By%20the%20sea is there a way to increase this?

    If you click ‘Show All’, you’re redirected to: https://chefstableware.co.uk/?s=By%20the%20sea&post_type=product which shows unrelated products.

    Avatar: laranz
    Laranz
    Participant
    June 26, 2017 at 04:10

    Hi,

    If you’re using a Child theme ( if not, create one ) and copy the search-results.php in to your child theme, and change the line #51 S

    $args['count'] = 3;

    Screenshot: http://take.ms/d0aBs

    to any greater value,

    Let us know,

    Thanks,
    laranz.

    Avatar: sitelabs
    sitelabs
    Participant
    June 26, 2017 at 09:56

    Thanks for that, it helps somewhat with the amount of products being displayed on the search results page. However, the ‘Show all’ link still doesn’t work, but that seems to be an issue with the custom search function.

    If I do a search for: https://chefstableware.co.uk/?s=by+the+sea, the search results appear to work OK.

    However, if we specify ‘product’ as a custom post type, that’s when the search results appear unrelated: https://chefstableware.co.uk/?s=by+the+sea&post_type=product

    This seems to me like a possible issue with the archive-product.php template the the theme’s woocommerce directory, but I’m struggling to figure it out.

    Avatar: laranz
    Laranz
    Participant
    June 26, 2017 at 10:50

    Hi,

    Can you try activate the parent theme and see what you got? If that still shows the error, then try disable all the plugins except the recommended once.

    Let us know,

    Thanks,
    laranz.

  • Viewing 9 results - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.Log in/Sign up

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.