Saturday, 31 January 2015

Enabling multiple logon session for same user in Websphere Commerce 7 Feature Pack 8



Till Websphere Commerce 7 feature pack7  it supports only once session per user.But this behavior can be changed in websphere commerce 7 feature pack 8 with the below configuration.


Open the wc-server.xml.

Inside the sessionManagement Section appened the text in bold at the end .

<SessionManagement>
……………………..

……………………..
<AllowMultipleLogonForSameUser display="false" enabled="true"/>
</SessionManagement>

Restart Server.

Friday, 30 January 2015

Sitemap Generation in websphere commerce 7



The SitemapGenerateCmd finds the sitemap template (Sitemap.jsp), and invokes it to get all the sitemap content into a single file.The sitemap template uses data beans (CatalogNodeListDatabean, CatalogNodeDataBean) to walk through the whole catalog tree.If SEO URL Pattern is enabled it will call createRawSitemapForSEO method in SitemapGenerateCmd .If SEO URL patterns is disabled in it wil call the createRawSitemap method in SitemapGenerateCmd.The sitemap.xml file is generated and will be saved in the temp directory.The command then splits the sitemap.xml  into multiple  files if the  file is too large. The command creates an index file, sitemapIndex.xml that refers to all the split results. The command then processes the generated index file for validations.The command then updates the instance with the generated files.


There are mainly two customizations possible in the sitemap generation

1. Extend the SitemapGenerateCmd to modify the site map generation logic.
2. Update the site map template file (SiteMap.jsp) for modifying the format or content of the site map generated.

1. Extend the SitemapGenerateCmd to modify the site map generation logic.
Write a commad which extends the SitemapGenerateCmdImpl and overrides the methods as required.

2. Update the site map template file (SiteMap.jsp) for modifying the format or content of the site map generated.

The template file (sitemap.jsp) scans the database for category and catalog entry views in order to generate the URLs. This file can be customized for changing the default metadata such as priority or lastmod.



Site Map Generation Example

In this example we are trying to create sitemap for the Aurora Store.(StoreId=11001 & catalogId=10351)

SiteMap


Login to Admin console as Site Admin.
Navigate to Scheduler section and click on New Schedule Job link.
Select SitemapGenerate from the scheduler drop down.
Give storeId=11001&catalogId=10351 as job parameters.




SiteMap
 
SiteMap




For each store we will get a separate sitemap_<<storeId>>.xml file  will be created inside C:\IBM\WCDE_ENT70_Latest\wasprofile\temp folder.

In Server environment it  will be created  under  /opt/was7dv/AppServer/profiles/comm7dv01/temp folder.

SiteMap




The sitemap.xml file is placed in the following directory for access by search engines:

WC_eardir /Stores.war (In Server)
WCDE_installdir /workspace/Stores/WebContent(In Toolkit)

Access the sitemap.xml

We can access the file by typing the file name from our store URL as below. 

http://host_name/webapp/wcs/stores/servlet/sitemap_storeId.xml
http://localhost/webapp/wcs/stores/servlet/sitemap_11001.xml

The Sitemap is an xml list of all the pages in your store that is submitted to search engines so that they can crawl and index the pages.

SiteMap