I have selected availability as STOCK STATUS while creating feed, but it is not picking up the availability status, while on product page it falls under the category of inventory> stock Status. I can’t find any other option to select it. Because of this it is not approving in merchant center
]]>I read this topic – Major bug in product inventory status and there is one thing I would like to clarify.?
Shameem (woo-hc) (@shameemreza) wrote:
If a parent product is marked as in stock, but all its variations are out of stock, it should still appear in the catalogue.
The exact conditions to recreate this case:
I can confirm that such a product will be displayed in the catalog. What is the practical justification for showing such a product in the catalog? I’m writing it from the perspective of a developer that develops a filtering plugin.?
Arguments against displaying such products in the catalog:
As a matter of common sense, such a product should be removed from the catalog. If all variations manage stock independently and are out of stock, the whole product should be all of stock. I would like to understand better why such a product is displayed in the catalog. Maybe there is something I missed.
In the FiboFilters plugin, we’re developing, we decided not to display such products in the catalog while WooCommerce displays them.?I would like to determine which path is more reasonable.
Best
Damian Góra
https://fibofilters.com
Is this not an option with the S2W plugin?
Thank you
]]>if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
add_filter('posts_clauses', 'order_by_stock_status', 2000);
}
function order_by_stock_status($posts_clauses) {
global $wpdb;
if (is_woocommerce() && (is_shop() || is_product_category() || is_product_tag())) {
$posts_clauses['join'] .= " INNER JOIN $wpdb->postmeta istockstatus ON ($wpdb->posts.ID = istockstatus.post_id) ";
$posts_clauses['orderby'] = " istockstatus.meta_value ASC, " . $posts_clauses['orderby'];
$posts_clauses['where'] = " AND istockstatus.meta_key = '_stock_status' AND istockstatus.meta_value <> '' " . $posts_clauses['where'];
}
return $posts_clauses;
}
i am using the above code to display out of stock products at the bottom of the page on my website, this code works perfectly on my shop page however does not work on pages where i use this shortcode to display products: [products limit=”8″ columns=”4″ orderby=”date” category=”zara men perfumes” cat_operator=”IN”].
I would like to modify this shortcode to also show instock products first, or only show instock products. Thanks.
]]>We don’t want the stock status to be visible in all categories.
Is it possible to make an enhancement for displaying stock status only in specific categories? Is there a setting for this in the current version?
Thank you
]]>I am wondering if there is a way to include “Stock Status” notices in the new Woo “Products (Beta)” block? I have created an additional product page within our site using a category to limit product display and need notices to also be visible on that page.
Is it possible to use the following hook: WC_Custom_Stock_status::instance() (or something similar) within a code snippet and custom section to get this to show up?
Thank you,
Steve
https://skr.sh/sJQYtGXwIzt
]]>