Welcome to the IBM Websphere Commerce Hub


Welcome to the IBM Websphere Commerce Hub

Come join me in my journey to explore the various features and capabilities of IBM Websphere Commerce and understand how retailers can benefit from its really cool out-of-box functionality.

Friday, April 27, 2012

A file does not exist for module element having uri: Rest.war

When you start the WebSphere Commerce Test Server, you receive an error that states that a file does not exist.

Problem

When starting the WebSphere Test Server after enabling the Management Center feature, a file does not exist error is displayed in the startup logs. For example,
[11-3-1 15:02:39:484 CST] 00000009 ApplicationMg E   WSVR0100W: An error occurred 
initializing, WC
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.NoModuleFileException: 
A file does not exist for module element having uri: Rest.war

Solution

To resolve this issue, you need to rebuild the LOBTools project and republish the test server, as follows:
  1. Open your WebSphere Commerce Developer workspace.
  2. Right-click the LOBTools project and rebuild it.
  3. If necessary, start the test server in the Servers view and ignore the error that states the file does not exist.
  4. After the test server starts, right-click the test server and click Publish. After publishing is complete, the error should no longer be displayed when you subsequently restart the test server.

Sunday, April 22, 2012

Know what features are enabled on WCS 7?

Query the database table SITE and you can find the list of features enabled in your WCS 7 application.
You can aslo find out the fix pack level.


You can find out the fix pack level and installed feature pack details using the versionInfo.bat


Day 7 : Generating Sitemaps to submit to search engine providers

A Sitemap is an xml list of all the pages in your store that is submitted to search engines so that they will know what to crawl and index. The Sitemap Generator has been enhanced in Feature Pack 3 to index the new friendly website addresses and search landing pages.

For more information on Sitemaps, see WebSphere Commerce integration with sitemaps.

With the WebSphere Commerce integration with sitemaps, you can create a sitemap XML file, sitemap_ storeID.xml, that contains a list of URLs for your site. This way, customers are able to easily find your site when they perform a search, promoting activity to your site, and increasing the probability of sales.
The sitemap_ storeID.xml file is placed in the following directory:
The OOB command SitemapGenerate can be scheduled at regular intervals to generate the SiteMap XML. Please refer the link Creating and scheduling the SitemapGenerate job for more details on the scheduling.

This concludes our week long SEO marathon. :)

Related Blogpost

Day 6 : Title and meta description (TMD) for SEO pages

Title and metadata information is valuable for allowing your store's pages to stand out on the internet. With the search engine optimization feature for WebSphere Commerce Version 7 Feature Pack 3, each web page in your store is provided with unique content to improve its ranking in search results.

The title and meta description data is comprised of:  
Page title
The page title appears in the customer's browser's title bar For example: Large Adjustable Desk Lamp | Madisons
Meta description
The meta description is used by search engines to provide a description of your site and the current web page's contents for a search results page. It is stored in the web pages HTML and is not viewable on the page itself.
Meta keyword
 The meta keyword is used for your store's static pages such as the contact us or help page for search engines to accurately rank and index the web page. It is stored in the web page's HTML and is not viewable on the page itself.
Image alt text
Image alt text describes the contents of an image for search engines to accurately rank and index the image. It is viewable by hovering over the image on the web page and can be used for text to speech systems for the visually impaired.

The TMD is defined as templates in the SEOPAGEDEF and SEOPAGEDEFDESC tables with the help of the SEO substitution parameters.
Other important tables wrt the TMD is SEOPAGEDEFOVR  and SEOPAGEDEFSUBPARAM.

Demo Video

In this demo video , we will learn how to define the TMD for the new static "Suggestions and Complaints" page which we have created in the Day 4 : Demo - Creating short SEO URLs for new static views.We will also understand the OOB tables.

Lets start the final legs of our marathon!




Demo Help Content

SQL Queries

insert into seopagedef (seopagedef_id, pagename, storeent_id, lastupdate, createdtime) values ((select max(seopagedef_id)+1 from seopagedef), 'SUGGESTIONS_PAGE', (select storeent_id from storeent where identifier = 'Madisons'), '2012-04-22 00:00:00.00', '2012-04-22 00:00:00.00');

update keys set counter = counter+1 where tablename like 'seopagedef';

insert into seopagedefdesc (seopagedef_id, language_id, title, meta_desc, meta_keyword, image_alt_desc, lastupdate, createdtime) values ((select max(seopagedef_id) from seopagedef), -1, 'Suggestion and Complaints at <seo: StoreName/>', 'Suggestion and Complaints at <seo: StoreName/>', 'Suggestion and Complaints <seo: StoreName/>', 'Image for Suggestion and Complaints at <seo: StoreName/>', '2012-04-22 00:00:00.00', '2012-04-22 00:00:00.00');

select * from seopagedef where storeent_id = (select storeent_id from storeent where identifier = 'Madisons');

select * from seopagedefdesc where SEOPAGEDEF_ID in (select SEOPAGEDEF_ID from seopagedef where storeent_id =  (select storeent_id from storeent where identifier = 'Madisons')) and language_id = -1;

select * from SEOPAGEDEFOVR;

JSP Changes
The SuggestionComplaints.jsp used can be downloaded from this link. Place it in the following directory - /Stores/WebContent/Madisons/StoreInfoArea/

Additional Read
Retrieving search engine optimization (SEO) substitution parameters for populating the Management Center UI

Related Blogpost
Smarter SEO for Smarter Commerce

Thursday, April 19, 2012

Paypal Integration with WCS 6.0

PayPal is one of the most well-known worldwide payment service providers. The flow for PayPal is different from traditional payment gateways, such as Visanet®. During shopping, an online store redirects the shopper to the PayPal web site to process the payment. PayPal Express Checkout is PayPal's premier checkout solution, which streamlines the checkout process for buyers and keeps them on the merchant's site after making a purchase.

The Express Checkout button gives buyers another way to pay, and it complements merchant’s existing payment solution. Online shoppers appreciate the convenience and security of PayPal, where they can pay with their PayPal balance, bank account, or credit card.

Key Features of Express Checkout

Express Checkout is a fast, easy way for buyers to pay with PayPal. Express Checkout eliminates one of the major causes of checkout abandonment by giving buyers all the transaction details at once, including order details, shipping options, insurance choices, and tax totals.
Studies show that adding the Express Checkout button to your website can increase your sales up to 18 percent.

For more details , refer PayPal Express Checkout Integration Guide

PayPal Plug-in for Websphere Commerce

IBM WebSphere Version 6.0 Plugin
The plug-in supports Express Checkout web flows and APIs. The plug-in has been developed by PayPal in collaboration with IBM's Commerce architects using WebSphere Commerce's payment plug-in API.

It supports:
  • SALE, AUTH, and ORDER transaction types
  • Multiple auth and captures - useful for orders that have multiple shipping addresses or associated back orders
  • Refund transactions
  •  All PayPal supported currencies.
The plug-in can be downloaded from the PayPal Integration Center using the link 

The integration steps can be found inside the downloadable itself.

PayPal Checkout Flow

Typical order flow for WebSphere Commerce

As shown in figure below, a typical order flow for a shopper is:
1. Checks out from the shopping cart page.
2. Provides shipping and billing address information
3. Chooses the Shipping Method
4. Reviews the order, chooses the payment method and pays for it.
5. Receives an order confirmation.




PayPal order flow with WebSphere Commerce

In an Express Checkout flow, a buyer still checks out at the beginning of the flow. However, after the buyer chooses the PayPal payment method, the buyer is re-directed to the PayPal web site for authentication. After that, the buyer is re-directed back to the WebSphere Commerce store to finish the left order flows.

In the Express Checkout flow, the shopper:
1. Checks out from the shopping cart page.
2. Provides shipping and billing address information
3. Chooses the Shipping Method
4. Reviews the order , chooses the PayPal as the payment method
5. Logs into PayPal to authenticate his or her identity.
6. Reviews the transaction on PayPal.
7. Confirms the order and pays from the site.

Figure below shows the Express Checkout flow:


References:

https://cms.paypal.com/us/cgi-in/?cmd=_rendercontent&content_ID=developer/e_howto_api_ECGettingStarted

http://publib.boulder.ibm.com/infocenter/wchelp/v6r0m0/index.jsp

Related Posts:
PayPal Integration with Websphere Commerce 7

Day 5 : 301 Redirections for Search Engine Optimization


301 URL redirection has been included as part of the SEO solution for WebSphere Commerce Feature Pack 3. If a URL is changed either by WebSphere Commerce or a business user, a redirect is automatically generated between the old and new URLs.
URL redirects have been implemented for the following cases:
  • When the URL of a catalog entry, catalog group or static page is updated, a redirect is automatically generated between the old and new URLs.
  • When an extended site specific URL for a catalog entry or catalog group is created, the asset store URL is duplicated to the extended site and then a redirect is created between the extended site duplicate of the asset store URL and the new URL
  • When an extended site specific URL is cleared for a catalog entry or catalog group, a redirect is created between the extended site URL and the asset store URL
In all of the above cases if the URL of a catalog entry or catalog group is updated multiple times then all previous redirects are updated to point to the latest URL for that catalog object. In this way redirection chains are avoided.

Demo Video


URL redirect traffic

Traffic statistics are recorded for individual redirect mappings. These statistics are held in the SEOREDIRECTTRAFFIC table.
This table holds:
  • The last used date of individual redirect mappings
  • The number of times that those redirect mappings are used
While there is no out-of-the-box user interface to view these statistics, these values are useful:
  • A custom user interface can be created in order to monitor when search engines, affiliate links, and customer's personal bookmarks are still referring to old URLs for your catalog entries or catalog groups
  • For determining when to delete old URLs from the database in order to improve system performance.

Performance Consideration

In order to help with performance, redirect traffic data is not sent to the database on each use of a redirect rule. Instead that data is stored in a cache, and is only flushed to the database once a certain number of redirect usages has occurred. This number is configurable by referring to the redirectHitCountBatchUpdateSize parameter in the SEORuntime section of the wc-admin-component.xml infrastructure configuration file.

Removing unused URLs 

When redirect mappings have not been used for some time it is safe to delete both the mapping and the original URL that is being redirected to decrease your database footprint. Unused redirected URLs are cleaned up automatically after 60 days by running a scheduler job. This number is the default out-of-the-box but is configurable by referring to the "numberOfDays" value in the SEORuntime section of the wc-admin-component.xml infrastructure configuration file.

Out of the box Scheduler : CleanSEOURLS

The CleanSEOURLS job command is used to clean up the tables related to search engine optimization (SEO) URL redirects and SEO URL keywords. An SEO URL redirect rule is deemed obsolete if the date the rule was last used by an incoming HTTP request has exceeded 60 days. This number is configurable by modifying the infrastructure component configuration file (wc-admin-component.xml). Once a redirect rule is deemed obsolete the original url keyword that was used in that rule is also deleted. These are the URL keywords that are marked as "inactive" when a redirect rule is created. 

This command will delete entries from the SEOREDIRECT, SEOREDIRECTTRAFFIC, SEOURLKEYWORD and SEOURL tables.

Related Blogpost
Smarter SEO for Smarter Commerce

Smarter Commerce - How it works?

A great video to watch and learn!


Monday, April 16, 2012

Day 4 : Demo - Creating short SEO URLs for new static views

Let us revisit and do some practical based on the concepts learned on Day 1 to Day 3.

In this demo tuturial , we will create a short SEO friendly URL for a custom view that we have created "SuggestionsComplaintsView" using the WCS 7 SEO Pattern mapping files in simple 3 steps.

We will change the long WCS URL
http://localhost/webapp/wcs/stores/servlet/SuggestionsComplaintsView?storeId=10051&catalogId=10051&langId=-1
to
Short Search Engine optimized URL
http://localhost/webapp/wcs/stores/servlet/en/madisons/suggestion-complaints

Pack up your energy drinks and lets sprint into the SEO world. I hope you will find it in useful.

Demo Video:


Help Section:

The JSPs and XMLs used in this demo can be downloaded from this link.

Pattern Definition made in the SEOURLPatterns-ext.xml

<seourl:seoUrlConfiguration
    xmlns:seourl="http://www.ibm.com/xmlns/prod/commerce/foundation/SEO/URLPattern"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/
SEO/URLPattern wc-seo-url-pattern.xsd">
    <!--
        SuggestionComplaints URL like this:
http://localhost/webapp/wcs/stores/servlet/en/madisons/suggestion-complaints    -->
    <seourl:seoUrlPatternDef name="SuggestionComplaintsURL">
        <seourl:seoUrlPattern viewName="SuggestionsComplaintsView">/LanguageToken/StoreToken:CatalogToken/SuggestionComplaintsToken</seourl:seoUrlPattern>
        <seourl:urlToParamMapping>
            <seourl:mapping name="langId" value="?LanguageToken?" />
            <seourl:mapping name="storeId" value="?StoreToken?" />
            <seourl:mapping name="catalogId" value="?CatalogToken?" />
        </seourl:urlToParamMapping>
        <seourl:paramToUrlMapping>
            <seourl:mapping name="LanguageToken" value="?langId?"
                defaultValue="-1" />
            <seourl:mapping name="StoreToken" value="?storeId?" />
            <seourl:mapping name="CatalogToken" value="?catalogId?" />
            <seourl:mapping name="SuggestionComplaintsToken" value="SuggestionComplaintsToken" />
        </seourl:paramToUrlMapping>
        <seourl:usageDef CMCPrefix="true">
            <seourl:usage device="browser">
                <seourl:target>SuggestionComplaints</seourl:target>
            </seourl:usage>
        </seourl:usageDef>
    </seourl:seoUrlPatternDef>
</seourl:seoUrlConfiguration>

SQL Executed
insert into seotokenusgtype (tokenusgtype_id, tokenusgtype, primarytoken,storeent_id, isstatic) values ((select counter+1 from KEYS where tablename='seotokenusgtype') , 'SuggestionComplaints', 'SuggestionComplaintsToken',<store-id>, 1);
update KEYS set counter=counter+1 where tablename='seotokenusgtype';
insert into seourl (seourl_id, tokenname, tokenvalue) values ((select counter+1 from KEYS where tablename='seourl'), 'SuggestionComplaintsToken', 'SuggestionComplaintsToken');
insert into seourlkeyword (seourlkeyword_id, seourl_id, storeent_id,language_id, urlkeyword, status) values((select counter+1 from KEYS where tablename='seourlkeyword'), (select seourl_id from seourl where tokenname='SuggestionComplaintsToken'), <store-id>, -1, 'suggestion-complaints', 1);
update KEYS set counter=counter+1 where tablename='seourl';
update KEYS set counter=counter+1 where tablename='seourlkeyword';


Related Blogpost
Smarter SEO for Smarter Commerce

Sunday, April 15, 2012

Day 3 : Search engine optimization (SEO) URL pattern files

Pattern files are used in the construction and deconstruction of SEO friendly URLs. A pattern file contains a template or model for a URL type in a store, such as a category, contact us or product page as each page type requires different data to be constructed.

For for details , please refer the Infocenter link.

Pattern files are located in this path :


The below diagram summarizes all the important learnings and explains how the SEO URLs are created based on the pattern definitions in the SEOURLPatterns.xml.



Related Reading

Related Blogpost
Smarter SEO for Smarter Commerce

Day 2 : WebSphere Commerce search engine optimization (SEO) data model

Please refer the below Infocenter link to get your familiarized with the SEO data model :

http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.data.doc/refs/rdmSEOfep3.htm



The use of the tables will get more and more clear in the subsequent blog posts :)

Related Blogpost
Smarter SEO for Smarter Commerce

Day 1 : Introducing "wcf:url" tag


To avoid having to hard code SEO friendly URLs in the storefront pages, the WebSphere Commerce Search Engine Optimization feature provides a wcf:url tag that will construct SEO friendly URLs using the SEO pattern file(s) and tables.

The current wcf:url tag is used by all starter stores to construct SEO friendly URLs. The UrlTag class has been enhanced to support the use of the new URL pattern definition to create SEO friendly URLs.

Incase you open any JSP , for example CachedFooterDisplay.jsp, you will notice that our old friend <c:url> tag which was used to construct the URLs in WCS6 has been replaced by <wcf:url>. So, let us spend some time leaning about the tag. 


About the wcf:url tag
The wcf:url tag builds a URL and applies the appropriate WebSphere Commerce supported rewriting rules.
It contains the following additions compared to the c:url tag:
  • It builds a full path URL, rather than a relative path.
  • It builds SEO compliant URLs if the feature is used in WebSphere Commerce.
  • It adds a prefix to the URL with the appropriate protocol, HTTP or HTTPS, depending on the Struts configuration files.
To know more about the tag and its parameters , please refer Infocenter

Important Note for FEP3 and above

Both the new Feature Pack 3 and previous SEO implementations are supported. You can choose which SEO solution to use by updating wc-server.xml.


<SEOConfiguration enable="true" dynamicUrl="true" defaultUrl="www.madisons.com">
     <context-root-rewrite value="/shop"/>
     <mapper-class-name value="com.ibm.commerce.seo.url.helpers.SEOURLMapperImpl"/>
</SEOConfiguration>
 
Either value or patternName is required. If workspace is used, then both value and patternName are required. If the value parameter is provided, then URLs will be constructed based on the mapping found in SEOUrlMapper.xml file using the SEO implementation from WebSphere Commerce Version 7 to Version 7 Feature Pack 2. If patternName is provided and SEO is enabled in wc-server.xml as shown in the following example, then URLs will be constructed based on the Version 7 Feature Pack 3 SEO design, using the pattern template definitions. Preference will be given to the patternName attribute over the value attribute.

If URL construction using patternName
fails (due to an invalid patternName or a missing parameter), dynamic
URL's will be constructed if the dynamicUrl attribute is set to true.
If dynamicUrl is set to false, then wcf:url tag returns defaultUrl
specified in wc-server.xml 
The URL creation order is:
  1. If SEO Enabled and patternName specified, use patternName and construct new SEO URL
    1. If new SEO URL construction fails and dynamicUrl = true, a dynamic URL is constructed
    2. If dynamicUrl = false, a defaultUrl is constructed
  2. Otherwise the value attribute is used an old SEO URL is constructed
The following diagram helps understand the SEO URL differences and the tag parameters :

Example
The following example forms a URL to display the shopping cart using the <wcf:url> tag. It specifies the URL type as an AJAX call.
<wcf:url var="currentShoppingCartLink" value="ShopCartPageView" type="Ajax">
   <wcf:param name="storeId"   value="${WCParam.storeId}"  />
   <wcf:param name="catalogId" value="${WCParam.catalogId}"/>
   <wcf:param name="langId" value="${WCParam.langId}" />
</wcf:url>
 
Related Blogpost
Smarter SEO for Smarter Commerce

Saturday, April 14, 2012

Smarter SEO for Smarter Commerce


Search engines, such as Google, are one of the most important channels for customers to reach your store. Using search engine optimization (SEO) to improve page ranking can result in increased traffic and revenue. We can understand its importance deeply and this is our attempt at understand the OOB capabilities of WCS 7 with regards to SEO and how it can be used for a Smarter Commerce.

The SEO functionality for WebSphere Commerce Version 7 Feature pack 3 or later improves online search page ranking for your store by creating short, clean SEO-friendly URLs with meaningful keywords. This version includes enhanced Management Center tools that business users can use to influence page ranking by changing the URL and metadata information, an improved Sitemap generator that indexes all the SEO-friendly URLs, and 301 URL redirect rules.
Search engine optimization for WebSphere Commerce provides the following functionality:
  • Creating simple, static URLs for store pages that shoppers and search robots can easily understand
  • Optimizing page meta data to improve search engine page rank
  • Creating 301 URL redirection when a web page has moved
  • Generating Sitemaps to submit to search engine provider
We are starting a week marathon to understand each of key capabilities.So, pack up your energy drinks and get ready to run with me!

Day 1 : Introducing "wcf:url" tag
Day 2 : WebSphere Commerce search engine optimization (SEO) data model 
Day 3 : Search engine optimization (SEO) URL pattern files
Day 4 : Demo - Creating short SEO URLs for new static views
Day 5 : 301 Redirections for Search Engine Optimization
Day 6 : Title and meta description (TMD) for SEO pages
Day 7 : Generating Sitemaps to submit to search engine providers