The same code will not work on category page/products list page, unfortunately, as $variants variable is not available at this page.
Basically, it requires more complex custom code modifications both in X-Cart's scripts and templates: your custom code should retrieve the variants info for each product to be displayed on category page, then pass the info to Smarty templates, to display the min. and max. variant prices for each product.
You can take advantage of our
custom development services, and our developers will implement such customization for you.