Clear resetting of tempProductId in loop