Tuesday, February 14, 2017

Creating a new Store in Hybris


  • Using modulegen create the corresponding accelerator module (For eg. if we are choosing the b2caccelerator).
  • The above step creates the customised extension for yacceleratorcore,yacceleratorfacade,yacceleratorinitialdata,yacceleratorstorefront,yacceleratortest and yacceleratorcockpit
  • Apparelstore and electronicstore extensions hold the sample store data. We could remove these extensions if we don't need them
  • Identify the changes required in the existing hybris product model for the customer's product model. Apply the changes in the items.xml file from the core extension
  • Create the impex script for product catalog, catalog versions, category taxonomy, classification structure(if applicable) etc. and put it in the initialdata extension
  • Configure solr index

Thursday, October 9, 2014

Best Selling and Top Browsed Items in Websphere Commerce

Most of the time an eCommerce site has to show the Best Selling items and the Top Browsed items in the store front. Websphere Commerce is having an OOB support for the same. One of the developers asked me how to do this and that is when I realized that it is worth mentioning that steps
  • Make the following changes in the wc-server.xml file
    • Enable personalization ID feature
      •  Ensure that the enable attribute is set to true to the
    • Enable persistent sessions feature
      •  Ensure that the enable attribute is set to true and cookieExpiry value to a +ve value
    • Enable the SensorEventListener(ensre enable attribute is true)
    • Enable the ExperimentEvaluationEventListener(ensre enable attribute is true)
      •  
  • Create an Emarketing spot to show the best selling/ top browsed items
  • Create a Web Activity for the Best Selling or Top Browsed Items and mention the E-Marketing spot created just above. Please note that the Best Selling & Top Browsed is limited to a Category
  • Now the system will show the top browsed and best selling items in the E-marketing spot. But even after doing all these you will not be able to see any of the best selling items. To see the best selling items you need to wait for next day because by default the scheduled job runs at 2:00am. If you want to see the best selling/top browsed item immediately, you need to do the following steps 
    • Browse and place orders in  multiple, different catalog entries in the target category
    • Run the RaiseECEvent scheduled job(This might not be required in case top browsed items list) using Admin Console. When a customer places an order, the RaiseECEvent job asynchronously check whether the categories associated with the purchased products match against any of the defined Display Best Sellers Web activities
    • Run the SaveMarketingStatistics scheduled job to save the Best Selling/Top Browsed events from memory to the DMRANKINGSTAT  table
    • Run the SQL query to make sure that SendMarketingTrigger job will take all the DMACTIVITY_IDs those are there in the DMARKETINSTAT table
      DELETE FROM DMACTATTR WHERE DMACTIVITY_ID = 0 OR DMACTIVITY_ID = 
      (SELECT DMACTIVITY_ID FROM DMACTIVITY WHERE NAME = '')
    • Run the SendMarketingTriggers job to aggreate the statics from DMRANKINGSTAT  to DMRANKINGITEM table
Reference :
http://www-01.ibm.com/support/docview.wss?uid=swg21576498
http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.admin.doc/refs/rsbtestranking.htm?lang=en


Tuesday, September 16, 2014

APAR information on WCS

versioninfo.sh file will provide you the feature pack fix pack information about your WCS installation. But how to get the APAR installed in a particular WCS installation? There are couple of ways you can check this

  • historyInfo.sh file will provide you all the installation/uninstall information about the fix pack feature pack and APARs
  • The file NIFStack.xml will contain the information about the apars installed. The location of the file is /instances//properties/version/update/backup/NIFStack.xml.
  • More information about the APAR installation will be there in /logs/update/APAR_name.install 
 

Monday, September 15, 2014

IHS Access Log for WebSphere Commerce sites

While doing the production server trouble shooting for many of the issues, the investigation starts from the IHS access logs. But the default IHS log configuration will not give you enough details for troubleshooting and diagnose the root cause server. It will be more complicated when there is a cache layer exists as well. The following log level will give you all the information needed for trouble shooting. The log will provide the output in a csv format so that it will be easier for further processing if needed

LogFormat  "\"%h\",\"%{%Y-%m-%d-%H.%M.%S.000000}t\",%p,\"%H\",\"%m\",\"%U\",\"%q\",%>s,\"%b\",\"%{WAS}e\",%D,\"%{CACHED_RESPONSE}o\"" common

h - Client IP
t - Access Time
p - Port
H - Protocol
m - Request method
U - URL without query String
q - Query String
>s - Status of the request
b - size of response in bytes
{WAS}e - Name of the WAS server
D - Time taken to serve request in micro seconds
{CACHED_RESPONSE}o - The request served from dyna cashe or not

If we want to shoe the request and response cookie values then we could use the following parameter for a short period of time

{Cookie}i - Cookie request header
{Set-Cookie}o - Cookie with response

Reference : http://www.ibm.com/developerworks/library/co-websphere-access-feature/
http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#formats

Monday, June 16, 2014

Facebook integration in WCS 7.0

The following step by step instructions will help some one to integrate facebook with WCS Aurora store
  • Open Store Management Tool from Management Center
  • Select the store in which you want to enable face book and open the store via double clicking
  • Select Configuration tab
  • Check the check box named "Facebook Integration" and save
  • The next step is to register the site to face book. If you don't have a facebook developer a/c please register as a developer first
  • Then "Create Application" button in the Facebook developer page and provide the details(You can create 'N' number of applications for each environments like testing,uat prod etc)
  • It will create the AppID. Add the generated to the WCS Database via providing the sql insert into storeconf(STOREENT_ID,NAME,VALUE) values (10001,'wc.facebook.application_id', 'fb_app_id_returned');
  • In the settings session on the Apps session of the Facebook developer page, select the Settings. Then press the "Add Platform" button and select type of application as website
  • The system ask you to enter the url enter http://localhost/webapp/wcs/stores/servlet/en/aurora as the url and press Save changes
  • Restart the server
  • Now when you are going to the storefront you will see the "Connect to Facebook" link the header session
  • You can see the statistics in the Dashboard page of Facebook developer
Reference : http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.aurora-starterstore.doc/concepts/csmsocfbint_aurora.htm?lang=en

Wednesday, February 6, 2013

Making An Attribute As NonFacetable in WCS

In Pr-Feature pack 5 of V7 to making an attribute as non facetable you need to do the following steps.
  • UPDATE ATTR SET searchable=0 WHERE attr_id =?(ideally this is the only step the business user makes via management center. But this change will not make the attribute as non facetable)
  • DELETE FROM ATTRDICTSRCHCONF WHERE ATTR_ID = ?(The mapping between attribute and search schema)
  •  DELETE FROM SRCHATTRPROP WHERE SRCHATTR_ID in (SELECT  SRCHATTR_ID FROM SRCHATTR WHERE IDENTIFIER LIKE ?(Table defining the search index attribute like facet, rank, sort etc..)
  •  DELETE FROM SRCHATTR WHERE IDENTIFIER = ? 
If you are using Feature pack 5 of V7 along with the above you need to do the following steps as well
  • UPDATE ATTR SET facetable=0 WHERE attr_id=?
  • DELETE FROM SRCHATTR WHERE SRCHATTR_ID IN (SELECT SRCHATTR_ID FROM FACET WHERE ATTR_ID =? )
  • DELETE FROM FACET WHERE ATTR_ID = ?

Thursday, January 10, 2013

Enable SQL logging in websphere commerce

Follow the steps to enable SQL logging in WCS
  • Log in to WAS Administrative console
  • Select Troubleshooting->logs and trace->server1->change log details levels
  • Expand element com.ibm.ejs.persistences.* & enable all Messages and traces for com.ibm.ejs.persistence.EJSDBCFinder and com.ibm.ejs.persistence.EJSJDBCPersister