1. PROMO Upgrade to Pro Membership @ $99 / Lifetime & access all our 16+ premium Divi extensions: Divi Block, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Solved Divi Search module failing to find Woo Commerce products

Discussion in 'Free Divi Community Forum' started by Grant Senior, Feb 13, 2024.

  1. Grant Senior

    Grant Senior Member

    I know this has been discussed a fair bit here already, but the posts are a bit dated, so, just wondering if there have been any recent developments to this. (I've been through the options discussed here https://divi.help/threads/how-to-make-divi-search-like-wocommerce-items-search.641/#post-17785)

    On this dev site, Home new - Vacuum & blowing solutions | VABS Ltd (thewebsiteguardians.dev), the Divi Search module is in place in the header, and as suggested on the forum link above, I am using the following in the Divi Theme Integration body:

    <script>
    jQuery(function($){
    $( ".et_pb_searchform div input[type=hidden]" ).remove();
    $( ".et_pb_searchform div" ).append( '<input type="hidden" name="post_type" value="product" />' );
    });
    </script>

    I have also added the added search function customization to the Divi Theme functions.php file as discussed here https://wpzone.co/wordpress-and-div...e-products-and-tags-with-divis-search-module/

    The Search module is half working now - it is finding products listed under Tags (there aren't many at this stage, but you can search for Accessories or Dry Clamp Pump and get results) and for any new products I manually add to the site, it will find those (if you do a search for 'Testing' you will get two products).

    But it's not finding any of the pre-existing products if searching using their name. The only thing I can think of that may be the reason for this is that all of the products, except for the few I have manually added for testing, are delivered to the site via a data syncing plugin for inventory from Xero. Is this likely to be the problem? Is there anything I can do to solve this so that all products are given in the search results?
     
    1. PRO MEMBER PERKS Divi Mini Cart Pro Plugin - Instantly add 3 different types of mini cart to your Divi site:Learn More
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    I see that your search module already added the correct query string to the URL to search for Woocommerce products: ?s=xxxx&post_type=product
    **I believe that search URL is processed by Wordpress, not Divi.

    But just as you said, some can be found in search, but others can't. For example, I search for RIEPS & it shows up. But if I search for PVRPA, nothing shows up.

    As you mentioned you are using data syncing plugin, you should refer to them as to why your products doesn't show up in Wordpress search using: ?s=xxxx&post_type=product
     
  3. Grant Senior

    Grant Senior Member

    ?? That's odd that RIEPS gave results, it's not a Tag; I did a search on BUSPS which, based on your search, should have given similar results, but got nothing. So, yes, I'll run this by the data sync plugin people. Thanks for looking at it!
     
    1. PRO MEMBER PERKS Custom Color Scheme + Premade Layouts - A perfect combination to boost productivity:Try Now
  4. Grant Senior

    Grant Senior Member

    I've heard back from the plugin developers and they say that the plugin is only updating prices and quantities, it doesn't have anything to do with delivery the products to the site, so, the problem still exists and is with WooCommerce/Divi still.

    Is it possible that because this build is a development build (a copied version of the original), that it is having issues reading the product database and only finding products created in the development build?
     
  5. Divi.Help

    Divi.Help Administrator
    Staff Member

    One last thing you may try is to resave your permalinks: WP Admin > Settings > Permalinks > Save
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade slide in bar design for your Divi site without using any plugins:View Demo
  6. Grant Senior

    Grant Senior Member

    Thanks, but that hasn't changed anything.

    I ran this problem by ChatGpt and it suggested checking the indexing settings for WooCommerce products in WordPress and ensure they are set to be indexed for search. I checked and couldn't find what it was suggesting, there was no reference to "Product Search," or "Product Indexing,".

    However, I've just discovered that in the WooCommerce product item there is a section called 'Publish', and in the Publish section there is the item, 'Catalog visibility: Shop and search results'. On selecting the Edit option for this item, Catalog visibility: Shop and search results, the following options are offered:
    Shop and search results
    Shop only
    Search results only
    Hidden

    All of the products are set to 'Shop and search results'.

    I selected a product, made no changes to the 'Catalog visibility: Shop and search results' options and did a search for it using the Divi Search module. As expected, the product was not found. I returned to the same product and selected a random 'Catalog visibility: Shop and search results' option and then reselected 'Shop and search results', updated the Publish settings and did another search for the product using the Divi Search module. This time the product was found. So, what does this mean? Why are these products, although set with 'Shop and search results' not being found?
     
  7. Divi.Help

    Divi.Help Administrator
    Staff Member

    What if for those products that are missing, try to go to edit it & press 'Update'. Will it show up?

    If it works, then probably the 'Catalog visibility' option is not being saved for those products. To quickly set all of them you can use the bulk edit feature:

    upload_2024-3-5_15-48-28.png
     
    Grant Senior likes this.
    1. PRO MEMBER PERKS Divi Powerful Child Theme - Power up your Divi sites with tons of new functionalities & premade elements:Learn More
  8. Grant Senior

    Grant Senior Member

    Yes, just using the update button did work.

    Can you please explain the Bulk Actions procedure I need to take? I realise you mean update a bulk amount, but how exactly do I do that?
     
  9. Divi.Help

    Divi.Help Administrator
    Staff Member

    You may start with 2 products & see if it works:

    upload_2024-3-5_16-52-8.png

    Basically, just tick your products, then select Edit as per screenshot above & click Apply.

    Once that's done, scroll down & click update & see if it works.
     
    Grant Senior likes this.
    1. PRO MEMBER PERKS Divi Block Pro - 30+ premade custom header designs for you to choose from:View Demo
  10. Grant Senior

    Grant Senior Member


    Cool! That's actually working. Great, thanks for your help! I now have a solution.
    Is there a quicker way to do this? I have 5900 products ;-)
     
  11. Divi.Help

    Divi.Help Administrator
    Staff Member

    Click on the Screen Options at top right side & set a higher Number of items per page.

    Then you can click the below to tick all at once.

    upload_2024-3-5_20-28-40.png
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade slide in bar design for your Divi site without using any plugins:View Demo
  12. Grant Senior

    Grant Senior Member

    You just keep bringing me good news! Thanks for that. (Yes, I was looking for something like this but couldn't spot it ;))