Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1076837

    jasonixr
    Participant

    Hello,

    I’m using Woocommerce with X and essential grid.

    Everything is working great and your support docs covered how to set it all up.

    However, when an item is out of stock it still shows in essential grid. There is a Woocommerce setting for suppressing out of stock items in the Woocommerce default catalog but it doesn’t appear to effect essential grid at all.

    How would I go about hiding out of stock items in essential grid?

    Thanks!

    #1077429

    Lely
    Moderator

    Hi There,

    Thanks for posting in. Please check this link for guidance:https://www.themepunch.com/faq/only-include-in-stock-woocommerce-products-in-grid/

    Hope this helps.

    #1078511

    jasonixr
    Participant
    This reply has been marked as private.
    #1078989

    Rue Nel
    Moderator

    Hello There,

    Thanks for the updates! Actually by default, you do not see the out of products. I have tested it by disabling your custom code. And to prove that, you have 26 product items and one is out of stock which is “I’Ki Splash Footstool”. When you visit your fashion page, it is not showing because it is out of stock. What you may have experience is just maybe a caching issue.

    In most cases WP Engine tries to cache its resources. This can cause stale data to be loaded. You’ll need to clear the site cache in WPEngine right after saving every changes you made in your dashboard just to make sure that you will see the latest changes you’ve made.

    How to purge the site cache
    You can use our interactive tutorial, “What should I do if I make changes and they don’t take effect?“, in the User Portal, or you can follow the instructions below.
    Purging your site cache is very easy. You just need to know where the button is located:

    1. Long into /wp-admin/
    2. Click on WP Engine button located at the left top side.

    WPE Plugin

    1. Click “Purge all caches.”


    Finally, clear your browser cache and refresh your page. Once you refresh the page you should notice that the content has updated. If it is still not updating, you may want to consider contacting support by creating a support ticket.

    To know more about WPEngine caching system, please check it out here: https://wpengine.com/support/cache/

    #1080701

    jasonixr
    Participant

    Thanks so much!

    I should have thought of WPEngine caching as possibly being the culprit; it’s caused problems in the past for me but I fell out of the habit of clearing it manually after changes.

    #1080722

    jasonixr
    Participant
    This reply has been marked as private.
    #1080872

    Rue Nel
    Moderator

    Hello There,

    By default the grid will get the items as stated in your source. This is why all products is being displayed no matter if it is in stock or not. You need to have an additional parameters to be able to filter out the items that you only want to display. In your case, you need to add an additional parameters (http://prntscr.com/brdl2g) like this:

    
    'meta_key=_stock_status&meta_value=instock&meta_compare="="'

    For a full list of parameters, please visit this link.

    #1080945

    jasonixr
    Participant
    This reply has been marked as private.
    #1080985

    Rue Nel
    Moderator

    Hello Again,

    It’s all about the additional parameters. In my last replay, the parameter displays all the in stock products. I have check your products and you have this:

    And I have applied the parameters in your grid and now your grid only display this:
    http://prntscr.com/brek3u
    http://prntscr.com/brekb0

    I am not sure if you are viewing what I am seeing in your Fashion page. All I know that if a product is in stock, you should have at least 1 product available and if a product is out of stock, you have a zero product. Unless otherwise you have have setting that if you only have one product, just consider it as an out of stock.

    Again, I will mention that the job of Essential Grid is to display all your product along with the category filter. It won’t matter if it is in stock or out of stock. Any additional filter you have like exclude the out of stock products will require additional parameters.

    And just an addition, we only gave you the help file from the creators of essential grid on how you can modify the grid’s items to only include products listed as “In Stock”. And you can check it here: https://www.themepunch.com/faq/only-include-in-stock-woocommerce-products-in-grid/

    For more advance tips, you can always check the documentation of Essential Grid:
    https://www.themepunch.com/faq/advanced-additional-parameters/
    https://www.themepunch.com/essgrid-doc/custom-wp-queries/
    https://www.themepunch.com/essgrid-doc/core-anatomy-of-an-essential-grid/

    #1081720

    jasonixr
    Participant

    Now that it’s the morning and I’ve had coffee it’s obvious what you were suggesting I do. I apologize for the confusion – let’s blame me working late at night on it. 🙂

    This definitely worked and I’ve applied it to all the applicable grids.

    Thanks!

    #1081826

    Prasant Rai
    Moderator

    You are most welcome. 🙂