when dealing with options, you should only have the Add to cart button on the Product Details page.
To load the product detail page, the product ID will be passed as a querystring variable.
the option recordset should filter the productoptions.ProductID column on the passed Querystring, for example if the querysting is named productID:
productsDetail.php?productID=12
the where clause should be:
WHERE optiongroups.OptionGroupName = 'Metal' AND productoptions.ProductID = paramItem
and the run time value for the parameter will be:
$_GET['productID']