Fix undefined indexs

If price_id doesn't exist in the array an undefined index notice occurs.

Name variable is only declared if the above condition is met, if it isn't it results in a undefined index notice.