Pages

Wednesday, May 22, 2013

Specify landing pages for search terms in WCS FEP2+

Landing pages for Search Terms WCS FEP2+


From FEP2 onwards, IBM provides a feature in management center where the user can configure landing pages for search keywords. For example,

search term                                             landing page
help                                                         HelpContactUsView

A specific requirement was to display the same view (ContentDisplayView) but with different parameters based on different search terms as in for search term "Terms and Conditions" the landing page should be ContentDisplayView?emsName=xxx where as for "privacy policy" it should be ContentDisplayView?emsName=yyy

Configuring this scenario using a relative path of the view by passing in the parameters doesn't work. However, landing page can be an absolute URL with query parameters like shown below


Instead of ContentDisplayView as the landing page, you can have http://hostname/webapp/wcs/stores/servlet/ContentDisplayView?storeId=nnn&catalogId=xxx&emsName=zzz

This fulfills the requirement of associating the same landing page with different search terms and different URL parameters.

Tuesday, February 26, 2013

Displaying Search Facets in WCS FEP5



Until about FEP4, the search facets data was in SRCHATTR and SRCHATTRPROP tables. SRCHATTR defines the search attributes and SRCHATTRPROPS defines the properties for the attributes (like facetable, displayable, searchable etc). 

In Feature pack 5, two new tables for facets are available namely, FACET and FACETDESC

As an example, to make price facets work for a different currency that is not supported out of the box, like AUD, we first need to create a search attribute (SRCHATTR table) with IDENTIFIER _cat.OfferPrice_AUD 

For the above search attribute, create a search attribute property name “facet” and property value “price_AUD:{* 100} 100;{100 200} 200;{200 300} 300;{300 400} 400;{400 500} 500;{500 *}” (adjust the range of facet as required)

Now add a row in FACET table with a reference to SRCHATTR_ID created in previous steps. Add appropriate descriptions to FACETDESC table.

Update registry and clear cache and should be able to view the facet on the storefront.

Loading Attribute Dictionary Attributes

Create two csv files as below

AttributeDictionaryAttributeAndAllowedValues.csv 

This contains the attribute name and allowed values AttributeDictionaryAttributeAndAllowedValues,,,,,,,,,,,,
Identifier,Type,AttributeType,Sequence,Displayable,Searchable,Comparable,Name,AllowedValue1,AllowedValue2,AllowedValue3,AllowedValue4,AllowedValue5,Delete

DRColour,STRING,AllowedValues,1.0,true,true,true,Colour,Black,Silver,,,,
DRTuner,STRING,AllowedValues,2.0,true,true,true,Tuner,Single tuner USB HDD PRV,,,,, 
  • The first two lines constitute the header.
  • The first column is an identifier for the attribute.
  • The 2nd column defines the type of the attribute value (STRING, DECIMAL, WHOLE NUMBER)
  • The 3rd column specifies the attribute type. Two types are possible (AllowedValues, AssignedValues). Using AllowedValues, business user can select one of the available values for an attribute. Using AssignedValues, business users can enter the value for the attribute. AllowedValues can be reused and assigned to a different catentry. This column will in most cases be AllowedValues.
  • The 4th Column is Sequence which defines the ordering of attributes. (1.0, 2.0, etc)
  • The 5th, 6th and 7th columns are the displayable, searchable and comparable field which is set to either true/false.
  • The 8th column defines the name of the attribute (like Colour, Size, etc)
  • Columns from 9 onwards to 13 represent the possible allowed values for an attribute.
  • Column 14 defines if the attribute has to be deleted by setting the Delete to 1 

CatalogEntryAttributeDictionaryAttributeRelationship.csv 

CatalogEntryAttributeDictionaryAttributeRelationship,,,,,,
PartNumber,AttributeIdentifier,ValueIdentifier,Value,Usage,Sequence,Delete
P_NZ40006688,DRColour,Black,,Descriptive,1,
P_NZ40006688,DRTuner,Single tuner USB HDD PRV,,Descriptive,2,
  • The first two lines constitute the header.
  • The 1st column defines the partnumber of the catentry to which an attribute is to be associated
  • The 2nd column is an identifier that identifies the attribute that needs to be associated with the catentry
  • The 3rd column is the identifier that identifies the value (an attribute can have multiple values) that needs to be associated with a catentry
  • The 4th column represents the value. (can be same as value identifier or empty)
  • The 5th Column defines the usage which can either be “Descriptive” or “Defining”. For SKU’s use Defining
  • The 6th column defines whether the association has to be deleted. Specifying 1 will delete any existing row. This can be 0 or empty for loading attributes.

TABLES AFFECTED 

ATTR – Contains the attribute definition
ATTRVAL – contains the attribute values
CATENTRYATTR – Contains the link between the catentry and the attribute

Note: These attributes are loaded to the store that owns the master catalog. In case of extended sites store it is the ExtendedSites CAS (Master catalog store entity)

Friday, February 22, 2013

Viewing and publishing Madisons Store in v7 FEP 5 (Developer Environment)



By default, in WCS Feature pack 5, the Madisons Store archives are not displayed in the publish wizard in administration console. These can be made available by following the steps below


Create a folder structure “conf/sar” inside WCDE_installdir/


Go to the starterstores folder in WCDE_installdir/starterstores and copy over any sar that is not available for publish in the wizard (like MadisonsStorefrontAssetStore-FEP.sar) from ExtendedSites folder to the conf/sar folder created above


Open the administration console and use the publish wizard and you should be able to see the sar file in the “Default” option of the publish wizard.

Thursday, February 21, 2013

NoSuchMethodError for getBIProvider()



After migrating from version 6 to version 7 of IBM Websphere Commerce, an exception is generated during the invocation of a getBIProvider() method when business user selects a store in Management Center.



The getBIProvider() method was introduced in version 7 of WCS. After the migration from v6 to v 7 of WCS, the coremetrics.jar file doesn’t get removed from the Stores/WEB-INF/lib directory.  Once removed, the latest coremetrics related class files are loaded.

Reference
http://www-01.ibm.com/support/docview.wss?uid=swg21503410