Posts Tagged ‘discounts’

Recently, I have seen a post in community on how to implement marketing discount based on quantity. The business requirement is to to set product price based on product quantity purchase.

Purchase Quantity                     Price
1 – 24                                        $20.00
25 – 49                                      $19.00
50 – 99                                      $18.00
100 and up                                $17.00

If customer buys 15 products, they have to pay $20 for each product.  If they buy 32, they have to pay $19 for each product and so on. It is pretty simple requirement and we can implement them using discounts priorities in commerce server.

For this, create a Base product with price as 20$. Now create three discounts of Minimum Purchase Discount type

  1. Discount 1 : Buy minimal purchase of 100 products and get 15% discount (discount Priority 1)
  2. Discount 2 : Buy minimal purchase of 50 products and get 10% discount (discount Priority 2)
  3. Discount 3 : Buy minimal purchase of 25 products and get 5% discount (discount Priority 3)

User cases:

  1. Customer purchased 24 products – none of the discount applies so he has to pay base price (20$ per product).
  2. Customer purchased 26 products – Discount 1 and 2 are not applicable and only discount 3 applies (he get 5% discount).
  3. Customer purchased 51 products – Discount 1 is not applicable and discount 2 & 3 are applicable. Discount 2 will be applied on the basket as it has more priority over discount 3 (he get 10% discount)
  4. Customer purchased 101 products – All Discounts are applicable. Discount 1 will be applied on the basket as it has more priority over discount 2 & 3 (he get 10% discount).

The solution works fine if we have to apply for 1 product. If we want to apply for more than one product then the problem starts. If the user takes 20 items of product A and 20 items of product B and if we created these discounts at category or all products level then the customer will get 10$ discount but our requirement says, the user is not eligible for any discount as he purchased less quantity (less than 25).

Picture1While creating “Minimum purchase discount type”, when the user selects for product, currently the business tool asks the user to select the product, instead if the user leave the text box blank then it should create this discount at product level.

Related Articles


If you like this post, please click on our sponsor advertisement.


Commerce server 2007 provides business users to develop six different type of discounts. They are

  1. Simple Discount
  2. Minimum purchase discount
  3. Buy N, Get 1 free
  4. Paired discount
  5. Paired set discount
  6. Order discount

There are some cases where you want to associate a dynamic discount to an Order. In commerce server we have two ways to associate a discount to an order

  1. When a customer provides a promotion code.
  2. When a site wide discount is available.

If your requirement is to associate a discount to an order (like 10% off or 20$ off), use following approach to achieve this.

  • In code behind, create a discount.
  • Add a promotion code to a discount.
  • Approve the discount. Note: If you are using discount cache, make sure you call refreshCache method.
  • Create a basket and associate the promotion code and perform checkout process.
  • Disapprove newly added discount.
  • Delete newly added discount.

Here I am not given end to end solution, but throwing some light on the approach.  If you feel it is difficult to to know which method to call for which action, you can refer to my blog – http://ravikk.spaces.live.com/blog/cns!F348D7145D1BE6C2!500.entry which explains how to know which commerce server method to call.

If you want to try before you implement in your code, you can refer to quick order code in my blog – it is having code which performs entire checkout at single action (you need to extend it by adding discount creation and deletion code). http://ravikk.spaces.live.com/blog/cns!F348D7145D1BE6C2!428.entry

Related Articles


If you like this post, please click on our sponsor advertisement.


Follow me on Google+
Add to circles

In 0 people's circles

Sign up for Newsletter