SlideShare une entreprise Scribd logo
1  sur  3
Télécharger pour lire hors ligne
Web



                       E-Commerce using
                       Commerce Server 2009
                       Developing wiDely usable e- commerce solutions using sharepoint

                       Nick Boumans


                       At the time of writing, the Netherlands has more than 20,000 online stores, a
                       number which is continually expanding. Since SharePoint has become more
                       widely deployed as an Internet solution, a requirement to have a SharePoint
                       based e-Commerce-solution is now available. Previously the only option was
                       to build a custom SharePoint solution, but now Microsoft Commerce Server
                       2009 can also be used for building a SharePoint based e-Commerce solution.


Commerce Server 2009                           is a Microsoft pro-
duct for building E-Commerce systems, using .NET based web
services and an abstract business layer, known as the Commerce
Server Foundation. The first release of this product was in the
year 1996, known as Site Server. The last release of Site Server
was in 1998. In 2000 when they released it they renamed it to
Commerce Server. The current version (2009) was released last
March. The SharePoint Commerce Services are responsible for
the integration between SharePoint and Commerce Server. The
platform is also a fully Service Orientated (SOA) enabled plat-      The SharePoint Default Site is a complete sample site inside Sha-
form including BizTalk adapters.                                     rePoint, using the Commerce Server Features. It’s possible to
                                                                     build your own E-commerce-solution in only a few steps, by defi-
Advantages of Commerce Server 2009                                   ning your own catalogue and connecting it to the Default Site.
will be noticed after running the SharePoint Commerce Services       The available tools (Image 2), which connect using Web Services,
wizard. Users have the ability to use some SharePoint Web Parts      are very helpful for tasks like defining your catalogue. By using
and the Default Site (Image 1). These Web Parts vary from a          the “Catalogue and Inventory Schema Manager” tool it is possible
Shopping basket Web Part to a “my Account” Web Part. A lot of        to make schema definitions for categories and products. Once de-
these Web Parts are customizable by XSLT. Also shipped is the        fined you can then setup the properties for products and catego-
CommerceSharePointExtensibilityKit which contains the sources        ries within the catalogue. After this step a catalogue can be built
of these Web Parts and User Controls, which could be very useful     and filled using the “Catalogue Manager” (Image 3).
for customizations.




                                                                     Original Article: Dutch .NET magazine | september 2009
Customizing the Commerce Server SharePoint Site is possible            Adding a product to the catalogue could be seen as a “Hello
by customizing the master page and CSS. A lot of Web Parts are         World”-development example for Commerce Server. As I menti-
using a template which uses XSL. These templates could be              oned earlier in this article, the first step is getting access to the
found in the Document Library “Commerce Server Templates”.             Commerce Context and using this context for modifying the cata-
So it is also possible to put your custom templates into this libra-   logue. In Code sample 1 you can see how it’s possible to add a
ry for use in the Web Parts. Using this method the most com-           product to the catalogue. The last code line is may be the most
mon customizations could be made. You can think about the              important one since changes will not be saved by forgetting the
order of the columns in the Shopping Basket Web Part.                  item.Save() procedure.
                                                                        // You have to add a reference to the Microsoft.CommerceServer.Ca-
                                                                        talog.dll //(CommerceSharePointExtensibilityKit) and the
Development using the Commerce Server API makes it possible,            // Microsoft.CommerceServer.Runtime.dll
by using .NET code, to customize e.g. the Default Site. By refer-       BaseCatalog baseCatalog = (BaseCatalog)CommerceContext.Current.Ca-

ring some dll’s in your Visual Studio Project it will be possible to    talogSystem.CatalogContext.GetCatalog(“Adventure Works Catalog”);
                                                                        Product item = baseCatalog.CreateProduct(“Tents”, “Iglo”, 30m,
use these API’s. Commonly used dll’s are:                               “Tents”);
 Microsoft.CommerceServer.Runtime.dll                                   item.DisplayName = “Iglo”;
 Microsoft.CommerceServer.Catalog.dll                                   item[“Description”] = “3mm Tent”;
 Microsoft.Commerce.Portal.Common.dll                                   item.Save();


                                                                       CODESAMPLE 1: ADDING A PRODUCT TO A CATEGORY IN A CATALOGUE

These dll’s could be found in the Web Part Extensibility Kit
(CommerceSharePointExtensibilityKit). To make these dll’s avai-        A Category definition describes the category in the catalogue.
lable, you have to build the sample project from the Web Part Ex-      This is a collection of properties which specify how information
tensibility Kit at the first time, after signing it with your own      has to be saved into a category. At the creation of a category defi-
strong name key. The first step of development is the “Commerce        nition, this definition will be added to the catalogue schema.
Context”-class which could be found in the CommerceServer.             To build a category definition:
Runtime.dll. This class makes it possible to manage catalogues.
For the best performance you only have to create one instance of       1. Create a category definition by using the CreateDefintion me-
this object and reuse it during the lifetime of the application.       thod of the CatalogContext object.
                                                                       2. Create properties using the AddProperty method of the Cata-
Development using the catalogue is one of the most common de-          logDefinition object.
velopment questions. In practice this will result in requirements      3. CatalogDefinition.Save() to save the definition.
as: a Web Part inside SharePoint to show or manage products
and categories. Beside the fact that this is possible using the Com-   Code sample 2 creates a catalogue definition “Movie Category” by
merce Server Tools or a Silverlight Web Part available from the        creating a CatalogDefinition object.
Microsoft Site, in most situations this solution doesn’t meet the       public static void CreateCategoryDefinition(CatalogContext con-
                                                                        text)
requirements of the customer.                                           {
                                                                             // Create a category definition for categories in a DVD cata-
                                                                        log.
                                                                             CatalogDefinition categoryDefinition = context.
                                                                        CreateDefinition(“Movie Category”, CatalogDefinitionType.Category-
                                                                        Definition);
                                                                             categoryDefinition.Description = “Categories for DVDs”;


No time for installing and
                                                                             // Create a description property for this category.
                                                                             CatalogProperty description = context.
                                                                        CreateProperty(“Description”, CatalogDataType.String, 500);

configuring? You can download the                                            // Add the property to the category definition.
                                                                             categoryDefinition.AddProperty(description.Name, Definition-

Microsoft Commerce Server 2009
                                                                        PropertyType.NormalProperty);
                                                                             // Save the definition.
                                                                             categoryDefinition.Save();

VPC and start today!                                                    }


                                                                       CODESAMPLE 2: BUILDING A CATEGORY DEFINITION



                                                                       Adding and deleting categories is the logical next step after crea-
                                                                       ting a category definition. The catalogue has two methods: Crea-
                                                                       teCategory and DeleteCategory. By adding a category you have to
                                                                       define a category definition. Code sample 3 and 4 shows how a
                                                                       category could be added and deleted by using the Catalog API.
                                                                       After deleting a category the method “PurgeDeletedItems” is res-
                                                                       ponsible for actual deleting items of the Catalog Database.




          Original Article: Dutch .NET magazine | september 2009
BaseCatalog baseCatalog = (BaseCatalog)CommerceContext.Current.Ca-
 talogSystem.CatalogContext.GetCatalog(“Movie Catalog”);
 // Add a category
 Category category = baseCatalog.CreateCategory(“MovieCategory”,
 “Adventure”);
 category.DisplayName = “Adventure”;
 category[“Description”] = “Adventure Movies”;
 category.Save();


CODESAMPLE 3: ADDING A CATEGORY


 ProductCatalog productCatalog = (ProductCatalog)CommerceContext.
 Current.CatalogSystem.CatalogContext.GetCatalog(“Movie Catalog”);


 // Delete the category
 productCatalog.DeleteCategory(“MovieCategory”);
 // Remove the deleted items from the catalog database
 productCatalog.PurgeDeletedItems();


CODESAMPLE 4: DELETING A CATEGORY


Newbie using Commerce Server 2009?
Maybe as a SharePoint developer you have not yet dived into
Commerce Server; however, it is really worth a try. If you don’t
want to spend any time on the installation and configuration be-
fore you can exercise, as you can download a Microsoft Com-
merce Server VPC from the Microsoft Connect site.


Links
Blog Nick Boumans: http://www.sharepointdevelopment.nl
Commerce Server 2009 VPC: https://connect.microsoft.com/Downloads/Download-
 Details.aspx?SiteID=643&DownloadID=16926
MSDN Commerce Server 2009 Forum: http://social.msdn.microsoft.com/Forums/
 en-US/commserver2009/threads
Inline property editor webpart: http://www.microsoft.com/downloads/details.
 aspx?FamilyID=fce87672-90cf-4ead-b100-6bbc24d96f66&displaylang=en




Nick Boumans, is SharePoint specialist and Microsoft Certified Trainer in the Nether-
lands.
Blog: http://www.SharePointDevelopment.nl.




                                                                                        Original Article: Dutch .NET magazine | september 2009

Contenu connexe

Dernier

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Dernier (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

2009 9 Dutch Net Magazine Commerce Server By Nick Boumans Uk

  • 1. Web E-Commerce using Commerce Server 2009 Developing wiDely usable e- commerce solutions using sharepoint Nick Boumans At the time of writing, the Netherlands has more than 20,000 online stores, a number which is continually expanding. Since SharePoint has become more widely deployed as an Internet solution, a requirement to have a SharePoint based e-Commerce-solution is now available. Previously the only option was to build a custom SharePoint solution, but now Microsoft Commerce Server 2009 can also be used for building a SharePoint based e-Commerce solution. Commerce Server 2009 is a Microsoft pro- duct for building E-Commerce systems, using .NET based web services and an abstract business layer, known as the Commerce Server Foundation. The first release of this product was in the year 1996, known as Site Server. The last release of Site Server was in 1998. In 2000 when they released it they renamed it to Commerce Server. The current version (2009) was released last March. The SharePoint Commerce Services are responsible for the integration between SharePoint and Commerce Server. The platform is also a fully Service Orientated (SOA) enabled plat- The SharePoint Default Site is a complete sample site inside Sha- form including BizTalk adapters. rePoint, using the Commerce Server Features. It’s possible to build your own E-commerce-solution in only a few steps, by defi- Advantages of Commerce Server 2009 ning your own catalogue and connecting it to the Default Site. will be noticed after running the SharePoint Commerce Services The available tools (Image 2), which connect using Web Services, wizard. Users have the ability to use some SharePoint Web Parts are very helpful for tasks like defining your catalogue. By using and the Default Site (Image 1). These Web Parts vary from a the “Catalogue and Inventory Schema Manager” tool it is possible Shopping basket Web Part to a “my Account” Web Part. A lot of to make schema definitions for categories and products. Once de- these Web Parts are customizable by XSLT. Also shipped is the fined you can then setup the properties for products and catego- CommerceSharePointExtensibilityKit which contains the sources ries within the catalogue. After this step a catalogue can be built of these Web Parts and User Controls, which could be very useful and filled using the “Catalogue Manager” (Image 3). for customizations. Original Article: Dutch .NET magazine | september 2009
  • 2. Customizing the Commerce Server SharePoint Site is possible Adding a product to the catalogue could be seen as a “Hello by customizing the master page and CSS. A lot of Web Parts are World”-development example for Commerce Server. As I menti- using a template which uses XSL. These templates could be oned earlier in this article, the first step is getting access to the found in the Document Library “Commerce Server Templates”. Commerce Context and using this context for modifying the cata- So it is also possible to put your custom templates into this libra- logue. In Code sample 1 you can see how it’s possible to add a ry for use in the Web Parts. Using this method the most com- product to the catalogue. The last code line is may be the most mon customizations could be made. You can think about the important one since changes will not be saved by forgetting the order of the columns in the Shopping Basket Web Part. item.Save() procedure. // You have to add a reference to the Microsoft.CommerceServer.Ca- talog.dll //(CommerceSharePointExtensibilityKit) and the Development using the Commerce Server API makes it possible, // Microsoft.CommerceServer.Runtime.dll by using .NET code, to customize e.g. the Default Site. By refer- BaseCatalog baseCatalog = (BaseCatalog)CommerceContext.Current.Ca- ring some dll’s in your Visual Studio Project it will be possible to talogSystem.CatalogContext.GetCatalog(“Adventure Works Catalog”); Product item = baseCatalog.CreateProduct(“Tents”, “Iglo”, 30m, use these API’s. Commonly used dll’s are: “Tents”); Microsoft.CommerceServer.Runtime.dll item.DisplayName = “Iglo”; Microsoft.CommerceServer.Catalog.dll item[“Description”] = “3mm Tent”; Microsoft.Commerce.Portal.Common.dll item.Save(); CODESAMPLE 1: ADDING A PRODUCT TO A CATEGORY IN A CATALOGUE These dll’s could be found in the Web Part Extensibility Kit (CommerceSharePointExtensibilityKit). To make these dll’s avai- A Category definition describes the category in the catalogue. lable, you have to build the sample project from the Web Part Ex- This is a collection of properties which specify how information tensibility Kit at the first time, after signing it with your own has to be saved into a category. At the creation of a category defi- strong name key. The first step of development is the “Commerce nition, this definition will be added to the catalogue schema. Context”-class which could be found in the CommerceServer. To build a category definition: Runtime.dll. This class makes it possible to manage catalogues. For the best performance you only have to create one instance of 1. Create a category definition by using the CreateDefintion me- this object and reuse it during the lifetime of the application. thod of the CatalogContext object. 2. Create properties using the AddProperty method of the Cata- Development using the catalogue is one of the most common de- logDefinition object. velopment questions. In practice this will result in requirements 3. CatalogDefinition.Save() to save the definition. as: a Web Part inside SharePoint to show or manage products and categories. Beside the fact that this is possible using the Com- Code sample 2 creates a catalogue definition “Movie Category” by merce Server Tools or a Silverlight Web Part available from the creating a CatalogDefinition object. Microsoft Site, in most situations this solution doesn’t meet the public static void CreateCategoryDefinition(CatalogContext con- text) requirements of the customer. { // Create a category definition for categories in a DVD cata- log. CatalogDefinition categoryDefinition = context. CreateDefinition(“Movie Category”, CatalogDefinitionType.Category- Definition); categoryDefinition.Description = “Categories for DVDs”; No time for installing and // Create a description property for this category. CatalogProperty description = context. CreateProperty(“Description”, CatalogDataType.String, 500); configuring? You can download the // Add the property to the category definition. categoryDefinition.AddProperty(description.Name, Definition- Microsoft Commerce Server 2009 PropertyType.NormalProperty); // Save the definition. categoryDefinition.Save(); VPC and start today! } CODESAMPLE 2: BUILDING A CATEGORY DEFINITION Adding and deleting categories is the logical next step after crea- ting a category definition. The catalogue has two methods: Crea- teCategory and DeleteCategory. By adding a category you have to define a category definition. Code sample 3 and 4 shows how a category could be added and deleted by using the Catalog API. After deleting a category the method “PurgeDeletedItems” is res- ponsible for actual deleting items of the Catalog Database. Original Article: Dutch .NET magazine | september 2009
  • 3. BaseCatalog baseCatalog = (BaseCatalog)CommerceContext.Current.Ca- talogSystem.CatalogContext.GetCatalog(“Movie Catalog”); // Add a category Category category = baseCatalog.CreateCategory(“MovieCategory”, “Adventure”); category.DisplayName = “Adventure”; category[“Description”] = “Adventure Movies”; category.Save(); CODESAMPLE 3: ADDING A CATEGORY ProductCatalog productCatalog = (ProductCatalog)CommerceContext. Current.CatalogSystem.CatalogContext.GetCatalog(“Movie Catalog”); // Delete the category productCatalog.DeleteCategory(“MovieCategory”); // Remove the deleted items from the catalog database productCatalog.PurgeDeletedItems(); CODESAMPLE 4: DELETING A CATEGORY Newbie using Commerce Server 2009? Maybe as a SharePoint developer you have not yet dived into Commerce Server; however, it is really worth a try. If you don’t want to spend any time on the installation and configuration be- fore you can exercise, as you can download a Microsoft Com- merce Server VPC from the Microsoft Connect site. Links Blog Nick Boumans: http://www.sharepointdevelopment.nl Commerce Server 2009 VPC: https://connect.microsoft.com/Downloads/Download- Details.aspx?SiteID=643&DownloadID=16926 MSDN Commerce Server 2009 Forum: http://social.msdn.microsoft.com/Forums/ en-US/commserver2009/threads Inline property editor webpart: http://www.microsoft.com/downloads/details. aspx?FamilyID=fce87672-90cf-4ead-b100-6bbc24d96f66&displaylang=en Nick Boumans, is SharePoint specialist and Microsoft Certified Trainer in the Nether- lands. Blog: http://www.SharePointDevelopment.nl. Original Article: Dutch .NET magazine | september 2009