Home › Forums › WoodMart support forum › Show out of Stock Products Last
Show out of Stock Products Last
- This topic has 5 replies, 3 voices, and was last updated 1 year, 12 months ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
April 18, 2022 at 4:43 pm #369175
LiamTGCSParticipantHi team, is there a way, or can you implement this feature?
To show out of stock products at the end of the pagination – there is no point showing out of stock products in the middle of in-stock products.
If you check the screenshot, you can see here that two out of stock products show in the middle of in-stock products. I think it is best to prioritize in-stock products rather than out of stock items.
Can this be a feature implemented if it doesn’t already exist in WoodMart for WooCommerce?
Attachments:
You must be logged in to view attached files.April 19, 2022 at 9:54 am #369330
Aizaz Imtiaz AwanKeymasterHello,
Sorry but there is no option in Theme Settings available for that.
For now and I am forwarding this to our development department for considering to add it in the theme,
but I am not giving you the guarantee for that because please note that a theme cannot satisfy all requirements as it may cause theme heaviness.
Sometimes it may require your own customization. So if the development department finds it fit with the theme environment then surely they will look through it.Best Regards
May 2, 2022 at 4:10 am #372394
LiamTGCSParticipantHi, just following up to see if there was any feedback from the development department, as this would definitely be a very useful feature, and will allow for a cleaner experience.
Alternatively, can you help with clean code I can add to the functions.php file in Child theme to show out of stock products last? I have some code, but it is not messy, and it doesn’t follow proper WooCommerce product positions (It simply filters by ASC).
add_filter( 'woocommerce_get_catalog_ordering_args', 'woo_sort_by_stock', 9999 ); function woo_sort_by_stock( $args ) { $args['orderby'] = 'meta_value'; $args['order'] = 'ASC'; $args['meta_key'] = '_stock_status'; return $args; }
-
This reply was modified 2 years, 10 months ago by
LiamTGCS.
May 2, 2022 at 10:37 am #372421
Aizaz Imtiaz AwanKeymasterHello,
Sorry but we don’t have a working solution to this. Such customization is out of our theme support scope
Best Regards.
March 7, 2023 at 4:22 pm #449045
giantpanosParticipant@LiamTGCS, have you found a solution for this?
I want to show out of stock products last as there is no point showing them earlier.
Thanks!
March 9, 2023 at 9:10 am #449553
Aizaz Imtiaz AwanKeymasterHello,
@giantpanos: We would suggest you to try contacting WooCommerce Support in this regard until @LiamTGCS responds because as you know the Archive pages come from WooCommerce by default and WooCommerce itself doesn’t allow such change. So, if you want to go with the Code Snippet change then they are the best ones to help you out with. Hope you can understand !Best Regards.
-
This reply was modified 2 years, 10 months ago by
-
AuthorPosts
- You must be logged in to create new topics. Login / Register