We want to update stock status with sql query. This query worked and products status does as out of stock in product page. But when i did clearing cache, products is appearing in stock
when i check products in admin panel, products is appearing in stock.
Does magento has function for product status change?
$query = "UPDATE cataloginventory_stock_status SET stock_status = 0 WHERE product_id=".$product_id;