I've been working with Sitecore Commerce 8 powered by Commerce Server now for a while and trying to configure the demo store which is based upon Reference Storefront solution provided by Sitecore commerce product team. I’ve successfully managed to get the demo store running after following configuration steps however I’d faced few issues while setting it up. In my upcoming blog posts I’ll be sharing my learning on some troubleshooting I went through.
I was trying to create a user account in demo storefront website. I got below error once I clicked on create user button after entering relevant details in create an account form.
In order to resolve above issue, I did following steps:
I was trying to create a user account in demo storefront website. I got below error once I clicked on create user button after entering relevant details in create an account form.
In order to resolve above issue, I did following steps:
- Verify that profile schema is correct. If profile schema is incorrect then import profile schema again.
- After importing schema, modify Sitecore Commerce 8.0 powered by Commerce Server Profile Schema for Sitecore Integration as described here.
- I have found that profile database schema was not correct and u_external_id column was missing in UserObject table of profile database.
- Make the following changes in UserObject table of profile database:
Add column: u_external_id NVARCHAR(256) NOT NULLIF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'userobject' AND COLUMN_NAME = 'u_external_id') BEGIN ALTER TABLE dbo.UserObject ADD u_external_id nvarchar(256) NOT NULL END GO
Create Index on: u_external_id, UNIQUE NONCLUSTERED INDEX and ASCIF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[UserObject]') AND name = N'IX_UserObject_ExternalId') DROP INDEX [IX_UserObject_ExternalId] ON [dbo].[UserObject] GO IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[UserObject]') AND name = N'IX_UserObject_ExternalId') CREATE UNIQUE NONCLUSTERED INDEX [IX_UserObject_ExternalId] ON [dbo].[UserObject] ( [u_external_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] GO
- Update Sitecore Commerce 8.0 powered by Commerce Server Profile Schema. Add a new GeneralInfo.ExternalId profile property that maps to the external id column, it must be required and unique. This blog explains how to add new property to user object in commerce server profile system.
- Refresh the cache and reload the register account page. You should no longer get the above error message and should be able to create new user account in demo storefront website.
0 comments :
Post a Comment