Commerce Server 2009
As you might be knowing that all commerce site details are stored in MSCS_Admin databases. At runtime, commerce server loads this information. The connection string to this database is in the registry in encrypted format.
If you want to know what all resources pointed to which database, either you can use commerce server manager to see the connection strings or you can run below query which provides you the connection strings for available commerce server site resources.
use MSCS_admingo DECLARE @siteName NVARCHAR(20)SET @siteName ='StarterSite' where s_Name = @siteName)) AND s_PropertyName IN ('connstr_db_Transactions','connstr_db_TransactionConfig', 'connstr_db_Catalog', 'connstr_db_Marketing', 'connstr_db_Lists') UNION SELECT s_PropertyName,CAST( s_Value as NVARCHAR(200)) FROM ResourceProps where i_ResourceID = (SELECT i_ResourceID from Resources where s_DisplayName IN (siteName)) AND s_PropertyName ='s_RefResource' and s_Value like '%Profile%')) AND s_PropertyName = 's_ProfileServiceConnectionString'
If you like this post, please click on our sponsor advertisement.
When you create a virtual catalog from one or more base/virtual catalogs, the data from base/virtual catalog is propagated into newly created virtual catalog. In the newly created virtual catalog, you can override few of the properties such as display name, price, description, ranking etc. Whenever there is a change in any one of the property data in base catalog, the virtual catalog needs to get rebuild in order to get those modified data. So, when you click on any virtual catalog in catalog manager, you will see a dialog box asking whether to rebuild the catalog now.
You might be wondering, in some instances even though the data is changed in the base catalog, the virtual catalog will not ask for rebuild. This is because the data rows you have changed in the base catalogs are materialized in virtual catalogs( this virtual catalog data is modified from the catalog manager). In such instances, any data changes in the base catalog will not be propagated to the virtual catalogs. Run below query to check the rows that got materialized in the virtual catalog.
| select * from [ADVC_CatalogProducts] where [#MaterializationNeeded]=1 – Note: ADVC is the virtual catalog name. |
Commerce server runtime has provided few methods by which we can rebuild all virtual catalogs (irrespective of any change / no change in the base catalog data). But these materialized rows will not get disturbed with that rebuild. If you want to get the base catalog data on rebuild, you need to set back the #MaterializationNeeded flag to 0. Note: if you change this bit flag, you may end up loosing materialized row data in the virtual catalog.
|
UPDATE [ADVC_CatalogProducts] SET [#MaterializationNeeded]=0 where [#MaterializationNeeded]=1 AND ProductID=’19393838′ |
If you like this post, please click on our sponsor advertisement.
Today one of the person has posted a question in commerce server forums asking whether commerce server API model is best or Multi Channel Foundation (MCF). I am trying to explain my point of view between two models. Hope this gives the readers an idea on advantages & disadvantages of each model.
Two years before, people are using commerce server API but they are not happy because of “X” reasons and MCF was bought to help them. Some of the reasons include
1. Reduce developer ramp-up time: Each sub-system has its own API model and developer has to learn in order to work on it. With MCF, CS DEV team has introduced a consistent model which works same & consistent in all sub-systems.
2. Out of Box “Business Logic” layer: Old commerce server developers are excited/afraid to work on commerce server pipelines. I said excited because this is the place where they can show their innovation of injecting business logic into the application and I said afraid because this is the place where they end up spending more time in development, deployment and also they need to consider more about application performance. There pipelines are very specific to order system/limited to marketing system and for other sub-systems there is no framework to introduce new business features. With the introduction of Operation Sequence components (which works on dependency injection), MCF provides us the flexibility to introduce new features to any sub-system.
3. Clear separation of Presentation & Business logic: Before we used to keep every business logic very close to presentation layer. For example, on the fly, I need to get price details from external system. So, we end up writing web service call in the presenter or a component after presenter. With introduction of operation sequence components, we can easily separate business logic from presentation layer.
4. Extensibility Model: MCF is on top of Entity model and this is totally extensible. Either the developer can create a new entity on top of existing entity or they can live with existing entity and all new properties can be added to the existing entity without modifying the entity (weakly typed properties).
5. Multiple operations in one call: This feature is awesome and I bet many of the developers are not using this. In a page you have to show three advertisements in the right hand of the page, categories in the left hand side of the page and mostly sold items in the middle. Generally we end up writing three calls to commerce server but with MCF, we can call single call to commerce server to fetch all these values.
6. Multiple presentation support: As MCF works on entities, it can interface with all new technologies such as LINQ, WCF, WPF & Silverlight thus making business to offer services on multiple channels (web, mobile, kiosk, etc.).
Good to know few of the advantages of MCF but as a developer if you really think, MCF has bought a confusion over developers. Some of them includes
1. It’s simple in architecture but MSDN has made it complex. If you want to learn MCF on your own by going through MSDN then its difficult.
2. Microsoft suggest all new applications to move to MCF but they haven’t published the road map of this technology. I don’t know whether MCF exist tomorrow or they introduce another framework.
3. No much support to ASP.NET: Microsoft has provided out of box site on SharePoint but not on ASP.NET thus making new business people to onboard their applications in SharePoint. If you want to develop on ASP.NET then you may end up writing new operations sequence components or tweaking the existing ones.
4. More development time is required if you want to create your own entities or operations or operation sequence components.
5. Performance overhead: MCF is developed on top of commerce server runtime, so it ends up consuming more resources than CS API.
The trade off is on application development time + performance (CS API) Vs. application scalability, extensibility, maintainability (MCF). A good architect choose the MCF over CS API as this framework will return more results throughout the application.
If you like this post, please click on our sponsor advertisement.
Strange thing happened few days before and thought of sharing the same to the readers. First I thought it was issue with commerce server product and later I found that this is how it was developed (feature).
Hmm.. looks very annoying to me when I found that the value is coming wrong from the foundation call. I checked CS2009 assemblies with the reflector but not able to find exactly place where datemodified column is getting changed. After some troubleshooting, I found out that this is read only property & gets updated whenever any of the entity property is updated. So, from CS2007 API lastmodified column is coming correctly and properly updated to datemodified property but after this assignment few more properties are updated to the entity which is triggering override of this value with the current date.
So, it’s a feature of the application not a bug. Finally, I end up creating another property in the entity to fetch LastModified value.
If you like this post, please click on our sponsor advertisement.
At last the long waiting CS2009 R2 is released today. Commerce Server 2009 R2 has come up with many features and provides an improved shopper and business management experience, a streamlined development experience, enhanced cross-channel enablement, and support for secure n-tier deployment when compared with existing CS2009 release.
You can download RC bits from below location.
Microsoft Commerce Server 2009 R2 includes the Microsoft Multi-Channel Commerce Foundation and Microsoft SharePoint Commerce Services.
- Multi-channel awareness, allowing you to name specific channels.
- Shopping features such as direct list support, Windows Live ID, and Bing Maps integration.
- A unified run-time programming model that uses a consistent structure for all calls across all Commerce Server 2009 R2 Core Systems.
- A metadata model to give descriptive data to all properties.
- Rich Internet application (RIA) support in a multi-tier environment.
- Commerce Server Routing Service, which is a Windows Communication Foundation (WCF) service that forwards requests from the Web Business Tools to the Commerce Foundation API.
SharePoint Commerce Services includes:
- Integration between Commerce Server 2009 R2 and SharePoint 2010 allowing for direct calls to lists through the Commerce Foundation.
- Out-of-the-box e-commerce Web Parts and controls, offering ready-to-go functionality for any SharePoint-hosted site.
- New Solution Storefront site that is pre-configured with the Web Parts and controls, ready to sell your merchandise.
- SharePoint Commerce Services Extensibility Kit, which provides source code as a starting point for customizations of commerce Web parts and the out-of-the-box Solution Storefront.
- Templates to easily skin specific pages with built-in template libraries, XSL transforms, along with Master Pages and CSS.
- What-you-see-is-what-you-get (WYSIWYG) content management and design experiences offering designers and business users on-site editing and management of information and content.
I will try and share my findings soon to the community.
If you like this post, please click on our sponsor advertisement.
