Tagged: x
-
AuthorPosts
-
February 16, 2017 at 4:41 am #1373381
AndreParticipantDear Support Team,
I’m having an issue with a website where the shop is powered by Essential Grid. What happens is that the Ess Grid doesn’t recognize an out of stock item and for that reason it keeps displaying them, regardless of their availability. The WooCommerce options are set to hide these same items.
I’ve followed Theme Punch’s official solution that can be found here.
Here’s the code they provide:add_filter('essgrid_modify_posts', 'eg_mod_posts', 10, 2); function eg_mod_posts($posts, $grid_id) { // only process if Grid ID equals "1" if($grid_id == 1) { $products = array(); foreach($posts as $post) { $id = $post['ID']; $meta = get_metadata('post', $id); if($meta['_stock_status'][0] == 'instock') { $products[] = $id; } } return $products; } return $posts; }When I use this code what happens is that all items from selected grid disappear, nothing is left to be seen by the user.
Could you please shed some light on what can be wrong here? Maybe another workaround or tweak to the provided code to fix the issue?
Thank you very much for your precious time.
Cheers!
February 16, 2017 at 4:43 am #1373382
AndreParticipantThis reply has been marked as private.February 16, 2017 at 10:23 am #1373730
ChristianModeratorHey there,
Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of a bundled plugin. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.
Thank you for your understanding.
February 16, 2017 at 10:34 am #1373740
AndreParticipantHi Christian,
I appreciate your reply. I’m using a plugin bundled with X and I am not trying to customize it in any way. I’m trying to use a basic option of the plugin which is to output Products to a grid. There is a bug though, not related to any kind of customization, that I’m seeking help with.
So my question persists, which is, how can I use this bundled plugin’s feature to output products on a grid but of course hiding the out of stock ones as that option is selected in the WooCommerce settings.
I truly hope you can agree with me that this is something that should be working out of the box and for that reason I’m reaching out to you.
Looking forward to hearing back from you.
Thank you,
Andre.
February 16, 2017 at 11:35 am #1373832
AndreParticipantHello again.
I’ve found the solution for this. Feel free to close this topic.
Cheers.
February 16, 2017 at 2:22 pm #1374022
JoaoModeratorThanks for letting us know!
Cheers
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1373381 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
