If using a recent version of CDSEO with canonical link support then the primary url would be indexed only regardless.
You could also change the code from:
Code:
{assign var="prodURL" value="product.php?productid=`$products.0.productid`&cat=$cat&page=1"}
to:
Code:
{assign var="prodURL" value="product.php?productid=`$products.0.productid`"}