calculate price according to product characteristics