Set discount for bulk buying

This code allows to you offer set discounts when a customer buys in bulk. The price is adjusted in the cart automatically. Change the thresholds and discount percentage to suit your purpose.