Commerce Server Blog

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

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

  • RCXml2Resx.exe tool stops working
  • Commerce Server Profile Importer Tool
  • Marketing Web service Exception: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM
  • Download Commerce Server 2009 Help Document
  • Commerce Server 2009 work with SharePoint 2010?
  • Failed to set value for profile property ‘email_address’.
  • ArgumentException: An item with the same key has already been added.
  • Please note that one or more items were removed from your order because the product is no longer sold.
  • How to Avoid Duplicate Orders Numbers in Commerce Server
  • Error: Microsoft.Commerce.Contracts.Faults.ItemDoesNotExistFault

Archives

  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • 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 commerce server commerce server 2007 commerce server manager Commerce Server SP2 discounts ecommerce Estimation Installation inventory Kanth Koppala marketing system migration error Mojave operation components operation sequence Order subsystem 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 .