Commerce Server Blog

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

Test Creditcard Numbers

ravikanth | September 25, 2008

Don’t limit your payment gateway testing to VISA or Master card. Here are the list of test credit card numbers. Use them to test your application.

VISA -  4444333322221111 ,  4111111111111111,  4929000000006
Master Card – 5555555555554444 ,  5105105105105100 , 5404000000000001
American Express – 378282246310005 , 371449635398431 , 374200000000004
Diners – 38520000023237
JCB – 3530111333300000
Switch – 6759400000000002 , 5641820000000005
Delta – 4658300000000001 , 4462000000000001
Visa Electron – 4917480000000008
Solo – 6334900000000005

Comments
No Comments »
Categories
commerce server 2007
Tags
Creditcard Numbers
Comments rss Comments rss
Trackback Trackback

Configuration Error – Unrecognized configuration section ‘membership’

ravikanth | September 25, 2008

After installing commerce server starter site and when I tried to open default.aspx file in browser, I got following error.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized configuration section ‘membership’

I found that the installation by default creates virtual directories and these virtual directories are using asp.net 1.1, I manually went to each directory and change the setting to use asp.net 2.0 (go to virtual directory properties, click on asp.net tab, select 2.0.xxxxx in asp.net version and click OK button). Do the same configuration changes to all virtual directories.

Comments
No Comments »
Categories
Troubleshoot, commerce server 2007
Tags
commerce server configuration error
Comments rss Comments rss
Trackback Trackback

How to delete Commerce Server Site

ravikanth | September 22, 2008

Whenever we create Commerce web site using visual studio Templates then the following folders/resources will be created:

  • Virtual Directories in IIS: Five Virtual directories will be created. i.e., one virtual directory (in total four) for each sub system and one virtual directory for the Site.
  • Physical Folders in File system: Five folders will be created in the file system (by default they are created in “C:Inetpubwwwroot”).
  • Database Server: Six databases are created on the Database Server. By default .MDF files will be stored in file system at this path “C:Program FilesMicrosoft SQL ServerMSSQLData”
  • Global Resources & Site Resources in Commerce Server Manager: In Commerce Server Manager console there will be two nodes.
    • Global Resources &
    • Commerce Sites (In turn will contain Site Resources & Applications folders under each site).

Deleting a site is not a small task. If you would like to delete site manually then you have to manually go to Commerce Server Manager, Database Server, IIS & File system and manually delete each and every resource/folder of that site. This process is tedious & can lead to mistakes.  If the user wants to create Commerce web site with deleted site name and the site deletion doesn’t happen properly then he will face errors.

Comments
No Comments »
Categories
commerce server 2007
Tags
commerce server site deletion, site delete
Comments rss Comments rss
Trackback Trackback

How many promotion codes are used in Commerce Server?

ravikanth | September 18, 2008

Through marketing manager, business users can create promotion codes. These promotion codes are stored in a tabled named – “mktg_promocode” in SQL Server. Sometimes we might want to know what are the promotion codes available and how many times the user has used this promotion code. Either you can search for the coupon code using marketing manager advance search or use following query to get details of all coupon codes.

use [StarterSite_marketing]
Go

Select
pc.u_pc_code as ‘Promotion Code’,
pc.u_pc_target_user as ‘Target User’,
pct.i_pctrans_used_count as ‘No. of Times Promo Used’,
i_pctrans_reserved_count as ‘No. of users reserved this promo’
From [mktg_promocode] pc , [mktg_promocode_transactions] pct
where pc.i_pc_id = pct.i_pc_id

For more information about Marketing tables related to coupons, visit following link.
http://msdn.microsoft.com/en-us/library/bb520796.aspx

Comments
No Comments »
Categories
commerce server 2007
Tags
commerce server coupons, coupon status, marketing system
Comments rss Comments rss
Trackback Trackback

Creating Custom Display Types in Commerce Server

ravikanth | September 2, 2008

Microsoft Commerce Server Marketing system allows business users to create different type of visual Advertisements. You can set the type using display type property as shown below.

Out of box commerce server provides a list of display types. These display types have unique identifier associated in SQL Server. You can refer to mktg_creative_type for more details.

Display Type Id Display Type

1

Image

2

Text

3

HTML

4

Non-Clickable Image

5

Buy Now

6

Windows Media Services

7

Left Vignette

8

Right Vignette

9

Top Vignette

10

No Display

Each display type has its own properties. For example, image display type will capture image URL and HTML display type will capture HTML. These property definitions are created in a table named mktg_creative_property. For example the template of image display type is as follows.

<!–Inserted by Microsoft Commerce Server–><A HREF = “{%RedirectUrl%}?ciid={%item_id%}&cachename={%CacheName%}&PageGroupId={%PageGroupId%}&url={%ClickUrl%}” TARGET = “{%TargetFrame%}”> <IMG SRC = “{%ImgUrl%}?CEVT={T=CAMP,CI={%item_id%},PG={%PageGroupId%},EVT=DOWNLOAD}” WIDTH = “{%Width%}” HEIGHT = “{%Height%}” BORDER = “{%Border%}” Alt = “{%AltText%}” /> </A>

If you observe the above template, you can find many place holders (text within {%%}). At runtime, before applying the template, commerce server fills the place holder with actual property values and render the text to the client. The advertisement details are stored in mktg_creative table and advertisement properties are stored in mktg_creative_property_value table.

So far we have discussed what are display types and how they are stored in SQL server. Lets see how can we create a custom display type which will render flash advertisements in the browser.

 To create a new display template for Flash, you should know the formatted HTML tags to render flash objects. Identify the properties that needs input from the user. For example, the HTML tags required to render flash object is

    <!–    <OBJECT classid=”clsid:D27CDB6E-AE6D-11cf-96B8-44455354FFFF” codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0“     WIDTH=”475″ HEIGHT=”475″ id=”FlashContent”>
    <PARAM NAME=movie VALUE=”advertisement.swf”>
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=”AllowScriptAccess” VALUE=”never”>
    <EMBED src=”advdrtisment.swf”
    quality=”high” WIDTH=”550″ HEIGHT=”400″ NAME=”FlashContent” AllowScriptAccess=”never”     TYPE=”application/x-shockwave-flash” PLUGINSPAGE=”http://www.macromedia.com/go/getflashplayer”>
    </EMBED>
    </OBJECT> –>

If you observe the HTML, to make the template dynamic we should accept few properties from the user and replace these user provided values with tokens. In the above case, we can make width, height and flash URL as properties.

    <!–    <OBJECT classid=”clsid:D27CDB6E-AE6D-11cf-96B8-44455354FFFF” codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0“     WIDTH=”{%width%}” HEIGHT=”{%height%}” id=”FlashContent”>
    <PARAM NAME=movie VALUE=”{%flashURL%}”>
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=”AllowScriptAccess” VALUE=”never”>
    <EMBED src=”{%flashURL%}”
    quality=”high” WIDTH=”{%width%}” HEIGHT=”{%height%}” NAME=”FlashContent” AllowScriptAccess=”never” TYPE=”application/x-shockwave-flash” PLUGINSPAGE=”http://www.macromedia.com/go/getflashplayer”>
    </EMBED>
    </OBJECT> –>

The next step is to create display template in to marketing system.You can find the code block on msdn to create or modify the DisplayTemplate and the URL is http://msdn.microsoft.com/hi-in/library/aa545356(en-us).aspx

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.CommerceServer.Marketing;namespace CreatingNewTemplate
{
class Program
{
static void Main(string[] args)
{
try
{
string campaignServiceUrl = @http://localhost/MarketingWebService/MarketingWebService.asmx;
MarketingServiceAgent ma = new MarketingServiceAgent(campaignServiceUrl);
MarketingContext marketingSystem = MarketingContext.Create(ma);// Create a new template.
DisplayTemplate template = marketingSystem.DisplayTemplates.NewDisplayTemplate();
template.Name = “Flash”;
template.Text = @”<OBJECT classid=”"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″” codebase=”"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0″” WIDTH=”"{%width%}”" HEIGHT=”"{%height%}”" id=”"FlashContent”"><PARAM NAME=movie VALUE=”"{%flashURL%}”"><PARAM NAME=quality VALUE=high><PARAM NAME=”"AllowScriptAccess”" VALUE=”"never”"><EMBED src=”"{%flashURL%}”" quality=”"high”" WIDTH=”"{%width%}”" HEIGHT=”"{%height%}”" NAME=”"FlashContent”" AllowScriptAccess=”"never”" TYPE=”"application/x-shockwave-flash”" PLUGINSPAGE=”"http://www.macromedia.com/go/getflashplayer”"></EMBED></OBJECT> “;

DisplayProperty property = new DisplayProperty(”Width”);
property.Type = DisplayPropertyType.Text;
property.DefaultValue = “100%”;
property.Label = “Width”;
template.Properties.Add(property);

property = new DisplayProperty(”Height”);
property.Type = DisplayPropertyType.Text;
property.DefaultValue = “100%”;
property.Label = “Height”;
template.Properties.Add(property);

property = new DisplayProperty(”flashURL”);
property.Type = DisplayPropertyType.Text;
property.Label = “Flash URL”;
template.Properties.Add(property);
template.Save();

// Template Success Created!
Console.WriteLine(”Successfully created template: {0}”, template.Name);
}
catch (Exception e)
{
Console.WriteLine(e.StackTrace);
}
}
}
}

Once you have executed the above code, you can see a new display type template was added to your site and when you create a new advertisement, you will find the template “Flash” is shown in display type and when you select it then the corresponding properties are shown in the next slide as shown below.

New Display Type properties

So, what are you waiting far. Start creating different display types and make your e-commerce site flashy with different types of advertisement.

Comments
1 Comment »
Categories
commerce server 2007
Tags
commerce server 2007 Display Types
Comments rss Comments rss
Trackback Trackback

« Previous Entries

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 .