Clean up undefined variable notice. Added is_single_product() function.