Commerce Server Blog

Build world class ecommerce applications using Microsoft Commerce Server
  •  
  • Home
  • About
  • Advertise
  • Copyright Policy
  • Disclaimer

Apply Discounts to Orders Dynamically

ravikanth | August 3, 2008

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

Comments
No Comments »
Categories
commerce server 2007
Tags
add discounts, commerce server, discounts, marketing system, quick order
Comments rss Comments rss
Trackback Trackback

Sign up for Newsletter


Categories

Quiz

  • Catalog Quiz for Beginners
  • Profile Quiz for Beginners
  • Quiz 1 for Advance Users
  • Quiz for Beginners

Recent Posts

  • Configuration Error: Could not load type ‘Microsoft.Commerce.Providers.SharePointCommerceOrderModule from assembly because the parent type is sealed
  • How commerce server Site Terms are stored
  • Troubleshoot: An unexpected error has occurred.
  • Design consideration for developing commerce server catalog system
  • Troubleshoot: AuthManager(CommerceServer): Error reading Commerce Server administration database
  • Account Creation Approval Process
  • Troubleshoot: Unauthorized exception when the new user tries to access MyAccount page
  • Microsoft Commerce Server 2009 code name "R2" – January 2010 Community Technical Preview
  • Merchant Access to Catalog Manager
  • Commerce Server 2009 December VPC ready for download

Archives

  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008

Tags

add discounts add images to profile Advantages of commerce server approve discounts authentication auto login process automatic user creation basket Brand Management business tools campaign management Catalog catalog import Category CategoryConfiguration cc_number checkout commerce 7 commerce server commerce server 2002 commerce server 2007 commerce server 2007 Display Types Commerce Server SP2 discounts ecommerce Estimation inventory Kanth Koppala marketing system migration error Mojave Product profile profile subsystem property metadata purchase order quick checkout Ravi Ravi Kanth site cache refresh starter site tools transactions error Variant
(c) 2009 Commerce Server Blog. All rights Reserved. Articles cannot be reproduced without permission from the author.Write to me at kanth@ravikanth.net if you have any comments, questions, suggestions about this site or would like to send us a tip
About Us | Terms of Use | Disclaimer | Advertise .