that happens when the recordset used for the add to cart button is empty, or does not contain the correct record for the item being added.
in your case, it is because the add to cart recordset does not contain the item being added because you are using both rand() and limiting to 2 records.
It's fine to do that on the recordset that is used to populate the page, but the recordset used by the add to cart button will need to return all products so that it can lookup the one being added.