WebSphere Commerce 7 | User Management | Reset Password

In Development Environment, if you wanted to reset the user credentials, you can follow these steps,

Scenario - 1 (If you don't know the Merchant Key):
In local environment, if you know any user credentials (Eg: MyUser1) and need to update another user credentials (Eg: MyUser2) with the same, here is the setup of queries, you need to execute,

    update userreg set SALT = (select SALT from userreg where LOGONID = 'MyUser1') where LOGONID = 'MyUser2'
    update userreg set LOGONPASSWORD = (select LOGONPASSWORD from userreg where LOGONID = 'MyUser1') where LOGONID = 'MyUser2';
    update userreg set status = 1 where logonid = 'MyUser2';
    update userreg set passwordexpired = 0 where logonid='MyUser2'; 


Scenario - 2 (If you know the Merchant Key):

If you know merchant key and here is the procedure,

1. Run the command
    wcs_password.bat <Your required password> <Your required Salt> <Merchant Key>
   
    Eg: wcs_password.bat myPassw0rd mySalt 0123456789abcdef
   
   It will generate encrypted password,
  
    Eg: 34jmgfjspuw93rsjdfi-qua4wd
  
2. Run the following queries,
    update userreg set SALT = 'mySalt' where LOGONID = 'wcsadmin'
    update userreg set LOGONPASSWORD = '34jmgfjspuw93rsjdfi-qua4wd' where LOGONID = 'wcsadmin';
    update userreg set status = 1 where logonid = 'wcsadmin';
    update userreg set passwordexpired = 0 where logonid='wcsadmin';

WebSphere Commerce 7 | Access Control Policies | Inserting Access Control Policies through SQL

Here are the queries, you need to execute to insert Access Control Policies for Views and Controller Commands,

--Query for ACL to insert a View
INSERT INTO ACACTION (ACACTION_ID, ACTION) VALUES ((SELECT COUNTER FROM KEYS WHERE TABLENAME='acaction'), 'MyNewView');

INSERT INTO ACACTACTGP (ACACTGRP_ID,ACACTION_ID) VALUES
((SELECT ACACTGRP_ID FROM ACACTGRP WHERE GROUPNAME = 'AllSiteUsersViews'
AND MEMBER_ID IN (SELECT ORGENTITY_ID FROM ORGENTITY WHERE ORGENTITYNAME='Root Organization')
),(SELECT ACACTION_ID FROM ACACTION WHERE ACTION='MyNewView'));

UPDATE KEYS SET COUNTER = COUNTER+1 WHERE TABLENAME = 'acaction';

--Query for ACL to insert a Command
INSERT INTO ACRESCGRY
(ACRESCGRY_ID,RESCLASSNAME)
VALUES
((SELECT COUNTER FROM KEYS WHERE TABLENAME='acrescgry'),'com.ibm.commerce.sample.commands.MyNewControllerCmd');

INSERT INTO ACRESACT
(ACRESCGRY_ID, ACACTION_ID)
VALUES
((SELECT COUNTER FROM KEYS WHERE TABLENAME='acrescgry'),(SELECT ACACTION_ID FROM ACACTION WHERE ACTION='Execute'));

INSERT INTO ACRESGPRES
(ACRESGRP_ID, ACRESCGRY_ID)
VALUES
((SELECT ACRESGRP_ID FROM ACRESGRP WHERE MEMBER_ID IN
(SELECT ORGENTITY_ID FROM ORGENTITY WHERE ORGENTITYNAME='Root Organization') and GRPNAME='AllSiteUserCmdResourceGroup'),
(SELECT COUNTER FROM KEYS WHERE TABLENAME='acrescgry'));

UPDATE KEYS SET COUNTER = COUNTER+1 WHERE TABLENAME = 'acrescgry';

WebSphere Commerce 7 | Search | Click on Category Pages Failing | CWXFS0010E

After FEP8 migration and when category pages are clicked, it is throwing the following exception,

CWXFS0010E: Failed to execute search request because the current store does not have a valid search configuration.
        at com.ibm.commerce.catalog.facade.client.AbstractCatalogFacadeClient.checkShowCatalogNavigationView(AbstractCatalogFacadeClient.java:1796)
        at com.ibm.commerce.catalog.facade.client.AbstractCatalogFacadeClient.getCatalogNavigationView(AbstractCatalogFacadeClient.java:1827)


And later, I have noticed WC/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml was empty with the following content,



Content of the file:
<_config:cores>
</_config:cores>

I have updated the file with the search-configuration and core information and it started working fine,


WebSphere Commerce 7 | User Login Failing | After Logout, it doesn't work

I have noticed in my local toolkit, User Registration was working fine. But, if you logout from the store, I am not able to login again with the same user. And in the logs also, I didn't notice any exception

Issue:
WC\xml\member\MemberRegistrationAttributes.xml was some how corrupted and it was empty

Fix:
After replaced WC\xml\member\MemberRegistrationAttributes.xml with the original file and after build and deploy, it started working fine


Thanks Vivek Kumar for quickly noticed the issue.



WebSphere Commerce 7 | Local Toolkit | "Loose Archive Resources path" Error

When ever you notice the following exception when you start the server in local environment,



Check whether all the paths and configurations are proper in the following files,
1. workspace\WC\xml\config\ToolkitModuleConfig.xml
2. workspace\.metadata\.plugins\com.ibm.etools.wrd.websphere.v7\looseconfigurations\WebSphereCommerceTestServer\WC\looseconfig.xmi

WebSphere Commerce 7 | Storefront | Enable "SearchBasedNavigation" through Queries

If you have problem logging in Management Center and  still wanted to enable Search Based Navigation through the Queries then here is the approach,

Queries to check whether Search Based Navigation is enabled,
select * from emspot where name = 'SearchBasedNavigation';
select * from DMEMSPOTDEF where emspot_id in (select emspot_id from emspot where name = 'SearchBasedNavigation'); 


Queries to enable Search Based Navigation for the store,
insert into emspot(emspot_id, storeent_id, name, usagetype, up_name) values ((select max(emspot_id)+1 from emspot), 10101, 'SearchBasedNavigation', 'STOREFEATURE', 'SEARCHBASEDNAVIGATION');
insert into DMEMSPOTDEF(dmemspotdef_id, emspot_id, storeent_id, contenttype, content, optcounter, sequence)
    values (
        (select max(DMEMSPOTDEF_ID) + 1 from DMEMSPOTDEF),
        (select emspot_id from emspot where name = 'SearchBasedNavigation' and storeent_id = 10101),
        10101,
        'FeatureEnabled',
        'true',
        0,
        0
    );

My Writings........

HCL Commerce v9.1 | Local Store Vs Remote Store

  Local Store Remote Store Project Type Migrated (Lift & Shift) - Newly Imp...