Edward
Member
Hello, I am using the davinci theme and this is that I am trying to achieve:
I want to keep all the products as published, even if they are out of stock (this is in order for clients that find those products on google do not get a 404 page, instead the clients should see the product but with the message of out of stock), but in the same time I don't want to show those products in my catalog, so I want to hide the products that are out of stock from the catalog, but still show the single-product page for out of stock items.
I tried to edit the taxonomy-product_cat.php, but the singleProductMin() function or the singleProduc() function don't provide any stock information when on the category page, so if the singleProductMin() function could provide an index for the array where it could say if on stock or not, we could use it to hide the product.
How can I achieve this, any thoughts?
I want to keep all the products as published, even if they are out of stock (this is in order for clients that find those products on google do not get a 404 page, instead the clients should see the product but with the message of out of stock), but in the same time I don't want to show those products in my catalog, so I want to hide the products that are out of stock from the catalog, but still show the single-product page for out of stock items.
I tried to edit the taxonomy-product_cat.php, but the singleProductMin() function or the singleProduc() function don't provide any stock information when on the category page, so if the singleProductMin() function could provide an index for the array where it could say if on stock or not, we could use it to hide the product.
How can I achieve this, any thoughts?
Last edited: