commerce server 2007
Two years back, I have blogged catalog importer, which will help us to import catalog data into commerce server. I have used this tool in many projects and business users like this tool as it uses excel as input parameter. Recently I see in communities asking for user profile import. User profile has some sensitive information (like password, secret question and answer, etc) and we can’t directly insert these data into database as these data should be encrypted using few algorithms (SHA1, SHA256, MD5, etc) before saving into database.
If your requirement is to import all existing user profiles then the good option is to insert data using commerce server API. I created a tool (simple and robust) which will help you to insert user profile (can extend to save address and other profiles) information in commerce server. The tool is very flexible and extensible without touching the code. Input to this tool is the excel file (sample file in data folder) and couple of constraints with this template are.
- The work sheet name should be “UserData”.
- Currently only 5 columns are there but you can extend the list – the column name should be same as commerce server column name. For example, if you want to import telephone number then the column name should be “GeneralInfo.tel_number”.
The code is pretty simple and self explanatory. When you run the tool, you will be prompted for excel file location. After providing the information, the tool loads data into data table and starts inserted data one by one into commerce server. The output of the tool looks like this (I have imported the sample data in the sample template file). Any wrong information in excel will lead to exception.
On successful import, if you query “UserObject” table (or other profile tables), you can find imported data.
Click here to download the tool.
If you like this post, please click on our sponsor advertisement.
Last week, I faced typical issue when we are trying to approve marketing campaign item from Marketing manager. Our data center is in Europe and business team is sitting in USA. They started complaining that they can’t approve the marketing items from their box and in the server we found following exception in event log.
|
An exception occurred in the ‘MarketingWebService’ Web service. Exception details follow: |
Seems to be strange but we found out that this exception is coming only when the business time is less than Europe time. After changing the business user timing from EST to Europe, the business tool started working fine. Root cause is yet to identify but in this post, I would like to convey the remedy to everyone.
If you like this post, please click on our sponsor advertisement.
During code development, some strange things happens and in routine, we will start blaming commerce server for not working. The same thing happened when we run basket pipeline after adding a product to the basket. Basket pipeline component has removed the newly added produce and written below error message in the log
“Please note that one or more items were removed from your order because the product is no longer sold”.
As usual, by seeing the error message in the log, we started looking whether inventory for that product is over. Later we have disabled the inventory and at last we have remove the mapping of inventory catalog and product catalog. After some troubleshooting we found that the item we are adding into the basket is a product family and we are setting product ID in the line item but not the variant ID. A simple miss has created a big mess
. So, friends, if you have seen such error either check for inventory or check if you are passing correct values to the line item.
If you like this post, please click on our sponsor advertisement.
I faced a strange issue during commerce site unpacking in test environment. The site packager shows the following error.
and the same error is logged in pub.log file – “Unable to access IIS. Either it is not installed, not running, or the user does not have sufficient priviledges”
I’m running as an Administrator on the box. I believe it is due to specific sites in IIS. I removing all the sites from IIS and when re-running the site packager, I am able to install the commerce server site without issue. Removing my existing IIS sites will work fine in local machines but will not work if we try to do the same in preproduction or production machines. This has triggered me back to do research on this issue.
I binged/googled, but the solutions I find online will not solve the problem. After investigation, I found that commerce server site packaging tool is parsing all web sites one by one before installing the site. Some where the tool fails to ready IIS metadata and start throwing the error. I found that it is happening if the server has any websites which are running on https (i.e., certificates installed). I am able to figure out the fix for this issue and the fix is assigning port 80 (with different host headers) to all the websites which uses https. After doing this change, the packager/CS 2009 site wizard is working fine. I following below approach in production environment (which may or may not work for you).
- Create port 80 binding (with different headers) to all websites where Https is used.
- Create the commerce site.
- Once our site started working, remove the bindings we have created from the websites.
Not sure whether there is any other better approaches available but this procedure has fixed my problem.
If you like this post, please click on our sponsor advertisement.
Commerce server site term is a set of valid values (in the form of key value pair) which can be used in conjunction with Profile system. For example, there is no point to ask user the month name – rather it would be good to provide month information in dropdown and the user can select one from it. By this, we are making the application to store uniform values. So, the common and unchanged items can be created as site terms.
By default commerce server creates many site terms, includes user title, user status, user role, months,weeks, year, etc. We have flexibility in creating our own profile objects by creating new tables in the database but the same flexibility is not applicable for site terms. All site terms are stored in a single table under profile database and the table name is “MemAttrib”. This table not only stores site terms but also stores product definition information. Few of the important fields to remember are
CatalogName: This field is used to differentiate whether the data belongs to site term or product definition. If catalogName field value contains “Site Terms”, that means the row belongs to site term and if it contains “Profile Definitions” means the row contains profile definition information.
MembershipName: This field is used to store site term or profile definition name.
AttributeName: This holds site term key name.
DisplayName: This holds site term value.
The below query can be used to fetch all data of site term “Country”
|
SELECT MemberAttribID, CatalogName, ClassDefName, MemberName, AttribName, DisplayName, Description, AttribType, ValSTR, ValNum, ValDateTime, |
Note: Since we are storing all information in a single table (unlike catalog tables), we don’t have the flexibility of using same site term for multiple languages.
If you like this post, please click on our sponsor advertisement.
