Fix unnecessary checks

Remove " isset($product) " after initialisation
Remove " isset($params)"
Cast cart ID into int