How do I calculate discount based on number of products selected?