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.

Tuesday, March 27, 2012

Error Initializing WC : Module not found

Did you make any changes to the WC application.xml and are now facing server start-up issues?

At times , make modifications to WC application.xml to say include a new service module within the BOD Framwork. If you do not create a back-up of the application.xml and face any issues after making the changes, you can try this very simple trick to revert the changes made to the XML and get the issues resolved.

In the "Design" view of the application.xml , you will find that as and when you make changes to the XML , the value of the "version" attribute changes. Simply edit the version attribute value and the XML changes will be rolled back to the version number selected.

Simple and easy! :)


Saturday, March 24, 2012

Coshopping - Steps to enable in WCS 7 Developer

Coshopping is one of the new features in WCS7 I am personally most excited about and can really add value & increase customer participation in any retailing site . I had introduced the concept of "Coshopping" in my previous post Coshopping- Shop with friends anytime.

Coshopping uses the WebSphere Application Server Communications Enabled Applications (CEA) Feature Pack and CEA peer-to-peer web collaboration widgets to synchronize each browser to the web page of the initializing shopper. 

 As I had promised to share the steps in my previous blog post , so here they are  :) -

Step 1 :Installing Feature Pack 2 or later 
Install WebSphere Commerce Version 7 Feature Pack 2 or later, which installs the coshopping feature.

Step 2 : Enable starter store enhancements 
Run the enablement scripts for starter store enhancements.


Step 3 : Download Websphere Application Server Feature Pack for CEA
The Feature Pack can be downloaded from the below link :
http://www-01.ibm.com/software/webservers/appserv/was/featurepacks/cea/
You will need Passport Advantage credentials to download the Feature Pack

This feature pack is one of the first WebSphere Application Server products to be installed by Installation Manager rather than by the programs based on InstallShield MultiPlatform (ISMP) that are used to install, update, and uninstall previous versions of WebSphere Application Server.

Once download is complete , extract the zip file and add the repository to the IIM (IBM Installation Manager).
File -> Preferences -> Repositories -> Add Repository..
The path of the repostory will be something similar to below :
<temp_directory>\cea_and_import_repositories\local-repositories\repository.config

Step 4 : Upgrade the WebSphere Application Server to Fix pack 17 and above
Important to note - whenever you apply Fix packs to the Websphere Application Server , be sure to apply the same level of fix pack to the Java SDK as well. If there are any mismatches , we will face issues while importing or synchronizing the Websphere Application installation into the Installation Manager.

You can choose to upgrade the WAS fix pack level using either Installation Manager or using Update Installer.

If using Update installer ,  the installation URL :
 
I had already upgraded the Websphere Application Test Server to 7.0.0.19 at the time of WCS 7 installation so I did not need to do this.

Optional: If you ever want to install a seperate instance of WAS

Download URL :
PartNumber : C1G0QML​.zip

Step 5 : Import the existing installation of the WebSphere Application Test Server into the IIM
  1. Open IIM
  2. Select "Import"
  3. Enter/Browse the Installation Directory of the Websphere Application Test Server. The path will  be - RAD_installdir\runtimes\base_v7\ and follow the steps and import.
  4.  The Websphere Application Test Server will be imported and now we can apply the Feature Packs to the installation using IIM. It will start appearing in the PackageGroup listings -


Step 6 : Install the CEA Feature Pack for Websphere Application Server 7

  1. Open IIM
  2. Select "Install"
  3. Select the packagename imported in step 5 and follow the GUI steps to install the feature pack 1.0.0.0



Step 7 : Update the CEA Feature Pack installed to version 1.0.0.1 or above
The latest version available is 1.0.0.11 and hence I installed the same.
Use the "Update" menu within the IIM to perform the activity

When you have finished the installation and upgrade, you need to create a WebSphere Application Server runtime environment that includes the feature pack's functions. We will augment the existing WAS profile.

Step 8 : Create a WebSphere Application Server runtime environment that includes the feature pack's functions
Augment the WebSphere Application Server profile.
  1. Open a command line.
  2. Go to the RAD_installdir\runtimes\base_v7\bin directory.
  3. Determine your profileName. To find a list of possible profileName options, manageprofiles.bat -listProfiles
  4. This command returns a list of the profileNameoptions that can be augmented. select the WebSphere Application profile.
  5. Backup the existing profile before augmenting 
    manageprofiles.bat -backupProfile -profileName profileName -backupFile <path of the backup zip>


  6. Run the manageprofiles command:
    manageprofiles.bat -augment -profileName profileName -templatePath ..\profileTemplates\CEA\default.ceafep
  7. If something goes wrong , either restore the backup profile (the backup taken in Step 8d) or use the "unaugment"  option to undo the augmentation
    manageprofiles.bat -unaugment -profileName profileName -ignoreStack -templatePath ..\profileTemplates\CEA\default.ceafep 
    OR
    manageprofiles -restoreProfile -backupFile <path of the backup zip>
Step 9: Configure the WebSphere Commerce test server:
  1. Open the WebSphere Application Server Administrative Console.
  2. Click Servers > Server Type > WebSphere Application Server > server1 > Communications Enabled Applications (CEA)
  3. Select Enable communications service.
  4. Change Virtual Host to WC_default_host, Click OK, and save the configuration.
  5. Click Environment > Virtual hosts > WC_default_host > Host Alias. Add the port for the SIP_DEFAULTHOST to the Virtual host. Ensure that a fully qualified domain name is used. You can check what the ports are for the SIP_DEFAULTHOST by selecting Servers > Server Type > WebSphere Application Server > server_name > Ports.
 Step 10: Integrate the CEA dojo library with the WebSphere Commerce EAR file.
  1. Stop the WebSphere Application test server.
  2. Close the WebSphere Commerce development environment.
  3. Go to WCDE_installdir\bin directory.
  4. Run the setupCoshopping.bat command.
Step 11: Publish the Madisons starter store 
Publish the Madisons.sar store archive. 
In Management Center, select the coshopping store function to add coshopping to the Madisons starter store storefront. 
In the Madisons starter store, use two different browsers to simulate a coshopping session.
Enjoy this amazing feature! 
Please feel free to drop comments incase you need any help with the steps.

Saturday, March 17, 2012

Search Term Associations

Search term associations suggest additional, different, or replacement products in search results. They can also link search terms to a selected landing page in the store. Search term associations are used as a product recommendation strategy to increase store sales when customers search for products, as the search submission is modified to increase or target search results.

What are some examples of search term associations?

Here are some examples of search term association activities that Product and Catalog Managers can create using the Catalog tool:
  • If a shopper searches the store for a laptop, you can define synonyms to include similar products in the search, such as notebook, netbook, or computer, to potentially increase the amount of search results that are returned. In this example, the search results include those for laptop, plus the search results for the notebook, netbook, or computer synonyms. This is helpful, for example, if your store sells many types of laptop computers.
  • If a shopper searches the store for a laptop, you can define replacement terms such as computer or desktop to modify the potential search results. In this example, the search results include the search results for the computer or desktop search terms, while optionally ignoring the original laptop search term. This is helpful, for example, if your store does not sell laptop computers, but does sell desktop computers.
  • If a shopper searches for a laptop, you can define the resulting landing page as a custom store page, showcasing a particular brand's laptop computers or other related products. Landing pages can also be used to promote certain activities in the store. For example, if a shopper searches the store for wish list, you can define the resulting landing page as the My Account: Personal Wish List page.

What are the benefits of search term associations?

WebSphere Commerce search, which includes support for search term associations, provides the following key business benefits:
  • Integrated search management tooling for business users in the Management Center, allowing business users to leverage site search behavior and other Precision Marketing triggers to offer product recommendations and promotions.
  • Use as a product recommendation strategy to increase store sales.

Which user roles use search term associations?

WebSphere Commerce search capabilities are easily leveraged by the following user roles:
  • Marketing Managers who want to define business rules to support various search functionality and influence search results for product merchandising to increase conversion rates.
  • Catalog and Product Managers who want to proactively influence search results and integrate search with merchandising and marketing.
 Demo
Infocenter Link : http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.admin.doc/concepts/cwnsearchtermassoc.htm
 

Precision Marketing - Category Product Recommendations

This post contains a three part video series to demostrate the "Precision Marketing" feature of the WebSphere Commerce and how it can be used to control the Category page Recommendations based on-
  1. Interactional Behavior
  2. Transactional (Shopping Cart)  Behavior
  3. Profile Information
This solution is recommended for websites where Collaborative Filtering may not be the ideal solution and the recommendations are based more on business rules. 

I hope you will enjoy the video series -

Part 1 : Recommendation based on Interactional Behavior (Page being viewed)



Part 2 : Recommendation based on Transactional (Shopping Cart)  Behavior (Items added in the shopping cart )



Part 3 : Recommendation based on Profile Information (Age Group)




Happy Recommending !

Friday, March 16, 2012

FB Integration



Facebook integration introduces the following Facebook functionality to the Madisons store:
  • Like button Social Plugin on the home and product pages
  • Send button Social Plugin on product pages
  • Facebook Activity Feed on the home page
  • Connect to Facebook
  • The Customer participates in Social Commerce trigger and target have been updated to capture 'Liking' on Product or Home pages via the marketing and promotions activities
A Facebook activity feed has been added to the store's home page. The Activity Feed plugin displays the most interesting recent activity taking place on your site. Shoppers can click on the links of recommended products to see if they like them. If the shopper has connected the store to their Facebook account or logged in using the Login button in the Activity Feed, a personalized feed is displayed featuring their friends' recommendations.
The Facebook integration features is independent of the Social Bridging and Social Commerce features and is easy to enable option for sites which are looking for some common basic FaceBook features such as Facebook Like , Facebook Share (Send) since the steps to integrate these features are much simpler than the Social Commerce Enablement. The FB integrations are based on the FBXML approach.

Pre-requisites:
1.       Feature Pack 4
2.       Madisons and MadisonsEnhancements SAR is published
3.       The enablement scripts for the “store-enhacement” is executed

Steps to enable:
  1. Step 1: Enable Facebook integration in the Store Management tool
    (Store Developer) In the Store Management tool, select the Facebook integration store function.
  2. Step 2: Create a Facebook application for your store
    (Store Developer) Register the store with Facebook.
  3. Step 3: Associate Facebook Application IDs for your stores
    (Store Developer) Insert the Facebook Application IDs for your stores into the STORECONF table.
  4. Step 4: Test Facebook integration on your storefront
    (Store Developer) Test Facebook integration by 'liking' your store's home page. Sadly , since callbacks to the local system is not possible, the “Send” functionality cannot be tested in the local system. We could use some concepts like “local tunneling” to enable web access to localhost.

Dialog activities can be created to target customers who performed FB “Like” on Homepage and Products.
For example, I have create a dialog activity which adds customer to FBLIKESEG when a customer clicks on the FB Like on Home page. A 10% discount on the order total is granted to all customers belonging to this category.



Below is a short demo video which demostrates the FB capabilities and Precision Marketing Social Commerce Extensions -



Thursday, March 15, 2012

RESOLVED : Unable to access WAS Admin Console

After I tried out the steps to resolve the WC Publishing issue as detailed out in my post -

http://wcs-hub.blogspot.in/2012/03/application-failed-to-install-wc.html

I found that I am unable to access the WAS Admin Console. Each time I try and access using the following URL -

https://localhost:9043/ibm/console/

I could see the following exception in the SystemOut.log -

7/1/09 11:08:49:971 CDT] 00000026 WebContainer E SRVE0255E: A WebGroup/Virtual Host to handle /IBM/console/ has not been defined.
[7/1/09 11:13:41:064 CDT] 00000027 WebContainer E SRVE0255E: A WebGroup/Virtual Host to handle /IBM/console/ has not been defined.
[7/1/09 11:13:56:705 CDT] 00000027 WebContainer E SRVE0255E: A WebGroup/Virtual Host to handle /IBM/console/ has not been defined.
[7/1/09 11:14:15:471 CDT] 00000026 WebContainer E SRVE0255E: A WebGroup/Virtual Host to handle /IBM/console/ has not been defined.
[7/1/09 11:14:30:424 CDT] 00000026 WebContainer E SRVE0255E: A WebGroup/Virtual Host to handle /IBM/console/logon.jsp has not been defined.
[7/1/09 11:14:53:299 CDT] 00000027 WebContainer E SRVE0255E: A WebGroup/Virtual Host to handle /IBM/console/logon.jsp has not been defined.
[7/1/09 11:15:11:939 CDT] 00000027 WebContainer E SRVE0255E: A WebGroup/Virtual Host to handle /IBM/console/ has not been defined.
[7/1/09 11:15:45:236 CDT] 00000026 WebContainer E SRVE0255E: A WebGroup/Virtual Host to handle /IBM/console/ has not been defined.

In Mozilla , I could see the following error -


I searched a lot of forums but no concrete solution. I found this suggestion in a forum which may work out for you (thought it did work for me! ) -

The problem has been fixed by executing this script: ${WAS_HOME}/bin/iscdeploy.bat -restore

I then went on to compare the folders which we had backed up in the previous post

- WCDE_installdir/wasprofile/config/cells/localhost/cus
- WCDE_installdir/wasprofile/config/cells/localhost/blas
- WCDE_installdir/wasprofile/temp

I found only the "WC" module has been restored and all other modules listed below are missing -
  • ibmasyncrsp
  •  IBMUTC
  •  isclite
  •  soccom
If the same is the case for you , just restore the missing module folders from the backup and restart the server. The WAS Admin Console will be up and running!



RESOLVED : Application Failed to Install. WC

WC application does not publish in WCS 7 toolkit and you see the below error -

com.ibm.websphere.management.exception.AdminException: A composition unit with name WC already exists. Select a different application name.

Dont worry .. the following steps will help you. I have tried it myself and it works :)

Problem(Abstract)

You are unable to publish an IBM WebSphere Commerce application to the integrated test server environment.

Symptom

The following error message is received when attempting to publish the WebSphere Commerce application in WebSphere Commerce Developer 7.0:
Application Failed to Install. WC


[10/6/10 16:31:39:541 EDT] 00000025 SystemErr R com.ibm.websphere.management.exception.AdminException: A composition unit with name WC already exists. Select a different application name.
[10/6/10 16:31:39:541 EDT] 00000025 SystemErr R at com.ibm.ws.management.application.task.
ValidateBLATask._validateBLAInstall(ValidateBLATask.java:344)
[10/6/10 16:31:39:541 EDT] 00000025 SystemErr R at com.ibm.ws.management.application.task.
ValidateBLATask._performTaskAsSystem(ValidateBLATask.java:128)
[10/6/10 16:31:39:541 EDT] 00000025 SystemErr R at com.ibm.ws.management.application.task.
ValidateBLATask$1.run(ValidateBLATask.java:100)
[10/6/10 16:31:39:541 EDT] 00000025 SystemErr R at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4389)
[10/6/10 16:31:39:541 EDT] 00000025 SystemErr R at com.ibm.ws.security.auth.ContextManagerImpl.runAsSpecified(ContextManagerImpl.java:4547)
[10/6/10 16:31:39:541 EDT] 00000025 SystemErr R at com.ibm.ws.management.application.task.ValidateBLATask.performTask(ValidateBLATask.java:97)
[10/6/10 16:31:39:541 EDT] 00000025 SystemErr R at com.ibm.ws.management.application.SchedulerImpl.run(SchedulerImpl.java:284)
[10/6/10 16:31:39:541 EDT] 00000025 SystemErr R at java.lang.Thread.run(Thread.java:735)

Cause

A previous failed application update has corrupted the applications configuration information.

 Resolving the problem

Perform the following steps to resolve this issue:

1. Stop the server

2. Backup and remove the following directories:
- WCDE_installdir/wasprofile/config/cells/localhost/cus
- WCDE_installdir/wasprofile/config/cells/localhost/blas
- WCDE_installdir/wasprofile/wstemp
- WCDE_installdir/wasprofile/temp
- WCDE_installdir/wasprofile/config/temp
3. Start the server

4. Publish the WebSphere Commerce application.

The above steps clears corrupted server configurations and allows for the publish action to run properly.

Important Note 

It is important that you keep a backup of the directories listed above since you may run into issues like few applications such as WAS Admin Console may not be accessible. If you face the same issue, please refer to the steps provided in my post - RESOLVED : Unable to access WAS Admin Console 

Alternatively , try just removing the module which is causing problem during publishing - WC



Wednesday, March 14, 2012

Capturing User Traffic

User traffic data is used in some operational reports. The user traffic details in Websphere Commerce is captured in the Out of the box table USRTRAFFIC and the same can be enabled through simple configuration changes in the Websphere Commerce configuration file wc-server.xml.
We need to edit the WebSphere Commerce configuration file to set the level of caching performed on user traffic data.

Steps:
Open wc-server.xml and locate the following the sample fragment. Set the value in the <start> element to true -
<component
compClassName="com.ibm.commerce.event.usertraffic.UserTrafficEventListener"
     enable="true" name="UserTrafficEventListener">
   <property display="false">
      <start enabled="true" />
   </property>
  </component>

Performance Considerations
The default number of URLs in the cache is 20 which means updates are made to the USRTRAFFIC table after 20 URLs have been requested. If this number is too low for your site, for example, if your site is very busy and you are concerned about performance impacts, you can increase the cache size.
You need to make decision on what is the optimum number of dafault URLs in the cache should be and update the same in the wc-server.xml. Locate the following code fragment and change the value highlighted in bold.

<LogSystem name="Log System">
   <messageLog display="false" notification="false"
       
notificationClassName="com.ibm.commerce.messaging.ras.ErrorNotificationHandler"
/>
   <activityLog display="false">
      
<userTraffic cacheSize="20" />
      <accessLogging cacheSize="32" logAllRequests="false" />
   </activityLog>
</LogSystem>

Restart the server post making the changes.

Collaborative filtering

Collaborative filtering is a method of calculating the similarities among a group of customers and using the buying and navigation activities of the group members as the basis for making product recommendation and prediction for a current user closly resembling the group. The feature has been implemented using the "LikeMinds" software.

LikeMinds is a collaborative filtering engine that analyzes user interactions that occur on your Web site and generates real time predictions and recommendations to your Web site users, which are displayed using Web activities.

LikeMinds cannot be installed in the Developer version.

Understanding Collaborative Filtering
As a simple example, if a particular customer looks at a book, the collaborative filtering application determines the group of customers that have either looked at, or purchased the same book. The application then generates a list of possible recommendations from the other items that the members of the established group have also looked at or purchased. The relevance of any particular recommendation is determined by the number of group members that have looked at the item being recommended. That is, if 75% of the group have purchased the item being considered for recommendation, then it would be highly relevant, compared to an item that only one member of the group has looked at. Finally, the most relevant recommendations are displayed to the current customer.

Multiple data sources may be used for making recommendations. Few examples are -
  • Clickstream events that capture the details of a customer's session
  • Data from existing company databases
WebSphere Commerce Recommendation Engine collects profile information to develop mentor groups. These groups are the foundation for subsequent product recommendations. Customers that fit the profile of a particular community are presented with recommendations based on the behaviors of others in the community.
When a user visits your Web site, WebSphere Commerce captures clickstream data which is stored in your database. For example, the following types of interactions may be recorded:
  • Products a user has purchased
  • Items added or removed from a shopping basket
  • A history of the user's navigation throughout the application
 Clickstream Recommendation Engine

The Clickstream Engine tracks clickstream (or rating) behavior and generates recommendations based on mentors who exhibit similar content and product affinities. The Clickstream Engine tracks the pages that users have looked at. As this data is collected, it is analyzed to identify users' traffic patterns. Finally, the Clickstream engine, then makes content recommendations for each specific user, using data from relevant subsets of the user base.
Typically, after a user has completed a minimum number of transaction activities, that user is assigned a set of mentors. A mentor is a specially designated user who has visited the Web site a number of times, and whose profile is similar to the user's. LikeMinds uses a technique called collaborative filtering to build a mentor's profile for each user to predict how much a user will like particular items and which items that user will enjoy, buy, or add to their shopping cart.

Where this feature can be used?
The Collaborative Filtering is recommended for retailers who satify the following -
  1. There are very large variety and number of items to recommend.
  2. The choices and promotions are typically based upon strong personal opinions rather than rules.
  3. Have sufficiently hight interaction rates and return visit rates.
An example of appropriate usage could be B2C Clothing Retailer.
Inappropriate  usage examples can be Credit Card Vendor(the recommendation are better when based on business rules - higher balance limits , lower annual percentage rates etc. Also , there are lower transaction and return visit rates) and Wedding dress retailer (lower transaction per session and return visit rates )

How to enable this feature?
This feature is not available for the Developer version.

More details on how this feature can be enabled can be found in the Infocenter at the below link
Collaborative Filtering

Sunday, March 11, 2012

PayPal Integration with Websphere Commerce 7

Hi Readers,

Please follow the below link to learn more about PayPal Checkout Express flow and its integration in WebSphere Commerce 7 -

http://www.ibm.com/developerworks/websphere/tutorials/1101_song/section3.html

There are some steps missing in the above tutorial. In addition to the steps in the tutorial, please run a ACPLOAD for the "PayPal"

The ACPolicy file contents can be found here -

<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE Policies SYSTEM "../dtd/accesscontrolpolicies.dtd">

<Policies>
 <Action Name="PayPal"
  CommandName="PayPal">
 </Action>
 <ActionGroup Name="AllSiteUsersViews"
    OwnerID="RootOrganization">
  <ActionGroupAction Name="PayPal"/>
 </ActionGroup>
</Policies>

For more information on the ACPLOAD, click acpload utility

The Paypal Sandbox environment seems to be having troubles , whenever it redirects to PayPal - I am being asked to login. On clicking on the link , it redirects me to "developer.paypal.com" instead of "sandbox.paypal.com". Since it redirects to the developer site , I login with my developer account and then with the personal account credentials. Now , to place orders - i need to click the back button to reach the "Order Summary" Page and then click on "Order".

Please comment if case you face the same issue or have a solution for the same!

Related Reads -
Enabling Punch-out Payments

Image Roll Overs and Broken Image Handling

This post is not exactly about WCS. But I have spent several sleepless nights to implement this functionality. Tried a lot of approaches , read a lot of blogs but each approach had some issue or other especially IE! 

Here is an approach to implement the image roll-overs and broken image handling using zero-size handling and jQuery.

This approach works for all major browsers - IE , FF , Chrome , Safari and also saves us from the ugly IE "StackOverFlow" error in IE (which might happen if an infinte loop is accidently due to "onerror" handling of image)


Image Roll Over

Problem Description

Image Rollover functionality are becoming quite common in various web-sites since they kind of put life to your website. They are generally easy to implement and involve changing the source of the img on hover and on mouse out. However , there could be scenarios when the toggle image ( the image to be displayed on mouse hover ) is not available either on the local server or third party image servers such as Scene7. Such scenarios need to be handled. Most often you can use the onerror attribute to assign alternate image from the server to be displayed if the toggle image is not available. The requirement that we have is - There are two preferred images to be shown on toggle. If preferredImage1 is not found , look for preferredImage2. If preferredImage2 is not available , then show the original image (effectively dont toggle)
Original Image
Base Image
Toggle Image
Preferred rollover image
Alternate Toggle Image
Alternate rollover image

Working Demo

Scenario 1 :
If all images are found, first preferred image will be black creme box
Scenario 2 :
The first preferred image not found at online src, second preferred image - white creme box
Scenario 3 :
None alternate images found , no toggle

Solution

This solution is based on zero height detection using jQuery for the missing images.
  • We define three image tag - 1. Original or Base Image(display:block) 2. Toggle or First Preferred Image(display:none) 3. Alternate Toggle Image(display:none). Since the src of the images are online and not available in local sever , having the three images preloaded reduces latency time.
  • Since there are possibilities that the toggle images are not available at the image server, we use the "onerror" attribute to explicitly set the height of the image as zero. Please make sure that no "alt" attribute is specified for the toggle images since the height attribute returned will be influenced by the "alt" text.
  • The toggle functions on mouse hover are implemented in such a way that it first checks the height of the first alternate image. If the height is zero , the "display" is set to "none", else "block". Similarly , the height of the next image is checked and the "display" attribute is manipulated. Please Note : The image detection needs to be done using jQuery since the toggle images are hidden by default (display:none). In IE , the height is always returned as zero for hidden image elements even if the image src is available. Hence the toggle functionality does not work as well.
Some other solutions could be dynamically changing the src of the images onerror. However , such an approach may cause the ugly "StackOverflow" errors in IE if two or more images are not available.

Sample Code

Disclaimer: The L'Oreal product images are just used as samples for the demo and this blog in no way endorses any products or websites. The image URLs were returned by the Google Images search results -
  • http://www.semichem.co.uk/images/product/large/3149.jpg
  • http://www.beautyheaven.com.au/product_images/28607/im_1-2.jpg
  • https://docs.google.com/open?id=0B_jnlfhC9eF0QUpic0d0S0otVFE
Author : Neha Das

Tuesday, March 6, 2012

Coshopping - Shop with friends anytime anywhere

Co-shopping is one of the coolest features which comes with WCS 7 - Feature Pack 2 and has fascinated me the most. I am not sure if any of the other competitive products have this feature.

Coshopping enables two shoppers to explore a store, view products, and chat about products.
Coshopping provides real-time synchronization of two shoppers' web browsers to create a single collaborative shopping session controlled by one shopper. Shoppers can grant and take control of the session, highlight web page elements, and send messages to one another. In coshopping, both shoppers operate separate browsing sessions with individual privacy protected.
Coshopping uses the WebSphere Application Server Communications Enabled Applications (CEA) Feature Pack and CEA peer-to-peer web collaboration widgets to synchronize each browser to the web page of the initializing shopper. For information about WebSphere Application Server Communications Enabled Applications (CEA) Feature Pack.

The main coshopping features are:
  • Explore a store
  • Take control of a session
  • Highlight web page elements
  • View products
  • Chat about products
Coshopping can enhance an existing contact center chat solution by allowing a customer service representative (CSR) to guide the customer through product browsing and selection on the site.
Coshopping supports two shoppers in a single session and a session time max of 30 minutes.

Below are few videos which gives a feel of this amazing feature ever. I hope you will be as excited as I am to explore this feature once you see these videos:

Co-shopping between two browsers
http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?topic=/com.ibm.iea.wcs/wcs/7.0.0.2/Stores/CoshoppingDemo/coshoppingdemo_viewlet_swf.html

Co-shopping with friends on an iPhone



Coming Soon: Enabling Co-shopping in local developer toolkit. Stay Tuned.
As promised , the steps to enable has been provided in my blog post -
http://wcs-hub.blogspot.in/2012/03/coshopping-steps-to-enable-in-wcs-7.html



Similiar Application : In my exploration quest , I found a retailer using a similar feature. Go try it out and enjoy this amazing and really really cool feature -

http://www.shopwithyourfriends.com

Sunday, March 4, 2012

Enabling WC Search

Enabling WC Search for Extended Sites for Developer Environment (Derby Database)
Step 1: Ensure that the site is configured to support the Management Center marketing features
Follow the steps out-lined in the below link-
Step 2: Install Feature Pack 2 or higher
Step 3: Enable Starter Stores Enhancements
Important Note: If you are enabling starter store enhancements in the WebSphere Commerce development environment, the default configuration includes a Derby database with all base, non feature pack, starter stores, including the Madisons starter store, prepublished. If you require a feature pack version of a starter store, publish the feature pack version using a different store name. You can create a new database without the pre-published stores or restore to a clean bootstrap Derby database then publish the feature pack version of the starter store. Also when configuring the WebSphere Commerce development environment you can select to a new bootstrap Derby database without the prepublished starter stores.
1.       Run the enablement script. Running the starter store enhancements enablement script also enables the Management Center feature. That is, if the Management Center feature is currently disabled, it is enabled after running the starter store enhancements enablement script.
enableFeature.bat -DfeatureName=store-enhancements
2.       If the script runs successfully, the message enableFeature.bat completed is displayed in the command window. For enablement details, see the WCDE_installdir\logs\enableFeature.log file.
3.       Republish the application
Step 4: Publish the Madisons enhancements store archive
1.       Open the Administration Console, selecting the Site option.

2.       From the Store Archives menu, select Publish. The Store Archives page displays listing the store archives available for publish. By default, the page displaying composite store archives displays.
Before publishing the 
MadisonsEnhancements.sar , make sure to publish the Madions-FEP.sar . The MadisonsEnhancements.sar. does not work properly with the Madisons.sar file and publish the same without prior publishing the version FEP will cause OOM since the Apache SOLR engine starts indexing for all languages.
-

3.       From the View list, select Add On Feature.
4.       Select MadisonsEnhancements.sar.
5.       Click Next.
6.       Select the Madisons-based starter store onto which you want to publish the Madisons enhancements store archive. The Publish wizard must publish the Madisons enhancements store archive on top of the Madisons starter store; no other starter stores are supported. There are three stores:
    1. Marketing store
    2. Catalog store
    3. Customer facing store
    4. If you are using a single store setup then choose the same store for all three.
    5. If you are using an Extended sites model, choose the appropriate stores that you are using.


7.       Click Next. The Summary page displays, listing the store archive and parameters selected, and the location to which the store archive is published.

8.       After reviewing the summary information, click Finish. A confirmation dialog displays, telling you the number of the publishing job. Note the job number for future reference.
9.       To check the publishing status, click Refresh.
10.   When the Publish Status column displays Successful, select the corresponding job number; then click Details.

11.   To launch the published store in a browser, click Launch Store.
12.   When you have finished viewing the store, bookmark the site, and close the browser.
13.   Restart the WebSphere Commerce Server.
Step 5: Enable the search-based navigation store function

Step 6: Ensure that your search server and index structure is deployed and built.
1.       Deploying the WebSphere Commerce search server locally (standard deployment mode)
The deployment option for the Developer is “Embedded”.
a.       Ensure that the test server is stopped and that Rational Application Developer is not running.
b.      Open command prompt and navigate to the following directory - WCDE_installdir\bin
c.       Execute the below command and ensure it runs successfully –
enableFeature.bat -DfeatureName=foundation
d.      Test your search deployment by navigating to the following URL
http://localhost/solr/Default/select?q=*%3A*
e.      If successful, you should receive a response resembling the following snippet:
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">140</int>
<lst name="params">
<str name="q">*:*</str>
</lst>
</lst>
<result name="response" numFound="0" start="0"/>
</response>
2.       Set up the WebSphere Commerce search index structure for a specific master catalog locally
a.       Ensure that the test server is stopped.
b.      Find out the cataloged for the Master Catalog. The same sample queries are provided below for the extended sites. Please note value returned in each step is used in the next query.
select storeent_id from storeent where IDENTIFIER='MyStoreRetail';--11101
select relatedstore_id from storerel where store_id=11101 and streltyp_id=-4 and relatedstore_id not in (11101); --11001
select catalog_id from storecat where storeent_id=11001 and mastercatalog='1'; --10351
c.       Navigate to the path - WCDE_installdir\components\foundation\subcomponents\search\bin
d.      Execute the following command –
setupSearchIndex.bat -masterCatalogId 10351 -dbname "WCDE_installdir\db\mall"
e.      Ensure that the utility runs successfully.
Consult the following table for the utility results:
Results
Description
Search index setup successfully completed without errors.
The utility ran successfully.
Search index setup successfully completed with warnings. Check the log file for more information.
The utility ran successfully but with warnings. Some warnings might be generated during the setup index process, however, they might not be important such as the utility skipping existing cores that have already been previously created.
Search index setup successfully completed with errors. Check the log file for more information.
The utility ran successfully but with errors. The job has not completely finished setup, and the log files should be checked to see where the problem occurred.
Search index setup not successful. An unrecoverable error has occurred. Check the log file for more information.
The utility did not run successfully. The log files should be checked to see where the problem occurred.
You can find the log file in the following location:
WC_installdir/components/foundation/subcomponents/search/log/wc-search-index-setup.log
f.        Restart the WebSphere Commerce search server.

3.       Preprocess the WebSphere Commerce search index data

You can preprocess the search index data to prepare your WebSphere Commerce data for indexing. The preprocess utility extracts and flattens WebSphere Commerce data and then outputs the data into a set of temporary tables inside the WebSphere Commerce database. The data in the temporary tables is from the base schema and is then used by the index building utility to populate the data into Solr indexes using Solr's Data Import Handler (DIH).
a.       Ensure that the test server is stopped.
b.      Navigate to the path WCDE_installdir\bin
c.       Run the preprocessing utility:
di-preprocess.bat "WCDE_installdir\search\pre-processConfig\MC_10351\Cloudscape" -localename en_US
d.      Ensure that the utility runs successfully.
e.      Verify that the output from the script contains no errors and that the last part of the output contains the following lines:
"Program exiting with exit code: 0.Data import pre-processing completed successfully with no errors."
Also, inspect the following file for errors: WCDE_installdir\logs\wc-dataimport-preprocess.log
4.       Build the WebSphere Commerce search index

You can build the WebSphere Commerce search index using the index building utility. It is a wrapping utility that updates the information in the Master Index using the Data Import Handler (DIH) service to build the index, either partially through delta index updates or completely through full index builds. When there are multiple indexes, for example, each language using its own separate index, the index is built multiple times.
a.       Ensure that the test server is started in Rational Application Developer
b.      Restart the WebSphere Commerce search server after preprocessing is complete, and ensure you can visit Solr over HTTP, for example:
http://localhost/solr/Default/select?q=*%3A*
c.       Navigate t
d.      Run the following command –
di-buildindex.bat -masterCatalogId 10351 -localename en_US -basePath "C:\IBM\WCDE_ENT70_1\workspace\Stores\WebContent\MyStoreRetailStorefrontAssetStore\StaticContent\en_US" -storeId 11051
where, 11051 is the storied of the StoreAssetStore since I did not have store specific content.
e.      Ensure that the utility runs successfully. If the utility runs successfully, you will receive the following message in the Command window:
Data import process completed successfully with no errors.
Step 6: Create search term associations
(Product Manager) Influence search results in the store by creating new search term associations, such as synonyms or replacement terms.
Step 7: Link search terms with landing pages     
(Product Manager) Promote certain store pages by linking search terms with landing pages.
Step 8: Create search rules
(Marketing Manager) Influence search results in the store by creating search rules, such as adding or replacing search criteria, changing the search result order, or specifying the top search result.
Step 9: Preview the influenced search results in the store
(Product/Marketing Manager) Preview the newly created search term associations, landing pages, and search rules in the store search results.