Hi,
If you don't want to do that manually, then you can develop a custom plugin and implement the onBeforeProductListingLoad trigger:
www.hikashop.com/support/documentation/6...reProductListingLoad
With it, you can modify dynamically the MySQL query loading the products on the listings.
So you could for example add an extra left join on the hikashop_product table grouping by the product_parent_id with a sum of the product_quantity of the variants with an extra condition on that sum to be either NULL or bigger than 0.
However, we can't do that by default in HikaShop. That means that the MySQL query loading the products on the listings will be slowed down a lot. With a lot of products/variants it could even make the MySQL query crash.
Alternatively, you could also have a custom plugin to update the main product stock when the stock of the variants is changed. But if you use the import system to import the stock, then that won't work as the triggers are not called during imports for efficiency.
Aternatively again, you could modify your CSV you're importing to add the main product stock. You could have an Excel macro automatically filling that data for you in your CSV.