Refactored purchaseItem to use new method getProductPrice