The only problem I see in the code you posted is that your last if() statement is missing a '}' to match with it's '{' brace.
Also note that by utilizing PHP's variable variables language construct (see: [man]variables.variable[/man]), you could shorten that code to something like:
$variables = array( 'field_Charger', 'field_Case', 'field_Software', 'field_Manual', 'field_Box' );
$price = 135;
foreach( $variables as $var )
if( isset( $$var ) )
$price += 2;
echo "Price is: $price";