the probelm was caused by the form action on the product details page:
action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>"?ProductID=<?php echo(intval($_GET['ProductID'])); ?>
needed to be changed to:
action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>?ProductID=<?php echo(intval($_GET['ProductID'])); ?>"
with ?ProductID=<?php echo(intval($_GET['ProductID'])); ?> outside of the quotes, it was not being included as part of the action so the recordset was empty.
in future, when using recordset info in the add to cart behavior, you should use the lookup Item ID option for the add to cart behavior.