Price discounts based on quantity and adding free items to cart based on total
I am trying to create a shopping cart in which if a certain number of items are added of the same item, the price reduces for that item. Can this be done and how? Also, I need to be able to add a free item to the cart automatically if the final total (before the shipping and any tax) equals a certain amount. At this time, I am using PayPal standards shopping cart, but it does not provide a viable solution for these two scenarios. Any help would be greatly appreciated.