Archive for January 2012

A promotion code, also know as a coupon code, is a code that is associated with a marketing discount. For example, business might give premium customers to enter the promotion code "DIS20P" to receive a 20% discount on their whole order. One or more unique promotion codes are associated with the discount. One of our customer wants to implement single coupon promotion code feature (similar to private coupon code). A single use code is a promotional code that applies to an order with a particular SKU in it. Customer will provide the promo code to the user on each day during the campaign that will allow them to order a free product for the given SKU. Once the order is placed the promotional code can no longer be used.

When the user lands into the site, we are creating an unregistered basket to him . User enters products into the basket, provide promotion codes & decide to perform checkout. Now we are converting the unregistered basket to register basket (moving data from old basket to new basket). Since the promotion code has usage limit as one and in such scenario the promotion code is not be used in new basked as it is already used in other basket. This is by design & feature/limitation of the commerce server.

I went ahead and tweaked the commerce server by introducing a custom stored procedure which will perform some action that will make the new basket accept the promotion code. When such scenario happens, I am decrementing the promotion reserve count & updating the promo history with new basket id. Below is the SQL code.

CREATE PROCEDURE [dbo].[TransferPromotionCode]
(

@PromotionCode NVARCHAR(100),

@BasketId UNIQUEIDENTIFIER
)

AS

BEGIN

DECLARE @PcId INT

SELECT @PcId= i_pc_id FROM mktg_promocode WHERE u_pc_code = @PromotionCode

UPDATE dbo.mktg_promocode_transactions

SET i_pctrans_reserved_count = i_pctrans_reserved_count -1

WHERE i_pc_id = @PcId

DELETE dbo.mktg_promocode_history

WHERE guid_pchist_basketordergroup_id = @BasketId

AND i_pc_id = @PcId

END

Related Articles


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


After configuring the default site using SharePoint Commerce Services Configuration Wizard tool & when I try to browse the application, the application throws back a wired exception & it says “The module ‘SharePointCommerceProfileModule’ depends on the site resource ‘Biz Data Service’ which does not exist in the Commerce Server administration database.” (as shown below).

clip_image002

After analyzing, I found that this is due to not proper configuration of profile system. I suspect there might be a problem with the tool while configuring profile resource. When I saw the application in commerce server manager, profile catalog is not seen (as shown below).

image

RESOLUTION : Add commerce server profile resources manually.

  • Open commerce server manager.
  • Deleted Profiles and CS Authentication from commerce server site.
  • Right click site node  and Add Resource.
  • Select MicrosoftCommerceDefaultSiteNoData.pup and click ok
  • Select CSAuthentication and Profiles, add them.

image

After creating profile resources, the site started working property.image

Related Articles


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


After installing commerce server , sometimes you will notice that your event log is flooded with lot of commerce server performance counter errors. The exception is shown below

Event Type: Error
Event Source: Commerce Server
Event Category: None
Event ID: 28675
Date: 1/19/2012
Time: 8:52:14 AM
User: N/A
Computer: 9W019RET

Description:
CSPerfCounters Component : Error with registry – ‘error reading registry’

image

 

These are CS2007 Performance Counters. You can either ignore these event messages or attempt to unregister/re-register the CSPerfCounters.dll (found in c:\program files\common files\Microsoft shared\enterprise servers\commerce server folder) which will solve the problem. You should be able to use the regsvr32 /i command to register the DLL.

image

Related Articles


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


Follow me on Google+
Couldn't get data from google+
Sign up for Newsletter