Attribute Dictionary
Attributes and Products relation will be there in CATENTRYATTR table.
Other required tables are,
ATTR,
ATTRDESC,
ATTRVAL,
ATTRVALDESC.
Using the Services provided by OOB we can get this data by
passing the catentryId and langId.
WCS Service:
<wcf:getData type="com.ibm.commerce.catalog.facade.datatypes.CatalogEntryType"
var="catentryAttr" expressionBuilder="getStoreCatalogEntryAttributesByID">
<wcf:contextData name="storeId"
data="${param.storeId}"/>
<wcf:param name="catEntryId"
value="${product.entitledItems[0].itemID}"/>
<wcf:param name="dataLanguageIds"
value="${WCParam.langId}"/>
</wcf:getData>
WCS Service will be called by using “wcf:getData” tag library. We need to specify expressionBuilder
which is already there in get-data-config.xml
(This file will be under the following folder /Stores/WebContent/WEB-INF/config/com.ibm.commerce.catalog/)
This is catalog related data, Member related xml file will be
under com.ibm.commerce.member/order
related xml will be under *.order.
This service will call the OOB BOD command CatalogEntryType and
using this service we can get the list of attributes associate to the itemID.
Example:
<c:forEach var="attribute"
items="${catentryAttr.catalogEntryAttributes.attributes}"
varStatus="aStatus">
<%-- Set the static attribute
values --%>
<c:if test="${attribute.usage
== 'Descriptive' && attribute.name == RONA_ECO}">
<c:set var="isEco"
value="${attribute.value.value}" scope="request"></c:set>
</c:if>
</c:forEach>
Comments