0

我是 WCS 的新手。Stackoverflow 的新手...

有人可以帮我如何根据购物车页面中的产品 ID 获取颜色和尺寸属性吗?

单击购物车页面中的链接时,它将重定向到快速浏览页面。我不想要那个。用户应该能够在购物车页面本身中选择尺寸和颜色...

如果您还需要什么,请告诉我...

4

1 回答 1

0

All the logic you need are in OrderItemDetail.jso and ProductDescription_Data.jspf .

you need to make sure of :

  • only itemBeans are added to shopping cart

  • when you loop them , you need to get the parent product for that itemBean , and then go over all the SKUs and combine their defining attributes in lists to show them .

  • also please note that sometime , itemBeans can be the only SKU of the product , in other word that product have one single SKU .. so there will be no options to select and sometimes that itemBean can be categorized under category without parent product .. called category item bean .. this will have NO parent product and you need just to show that SKU options .

a snippet to retrieve CatEntry form Solr would be like:

<wcf:getData type="com.ibm.commerce.catalog.facade.datatypes.CatalogNavigationViewType" var="allCatEntryInOrder" expressionBuilder="getCatalogEntryViewParentInfoByIDNoEntitlementCheck">

    <wcf:param name="UniqueID" value="${orderItem0.catalogEntryIdentifier.uniqueID}"/>
    <wcf:contextData name="storeId" data="${WCParam.storeId}" />
    <wcf:contextData name="catalogId" data="${WCParam.catalogId}" />
</wcf:getData>

then to get the Parent CatentryId you need to call solr again same as above but with

<wcf:param name="UniqueID" value="${aCatEntry.parentCatalogEntryID}"/>

please read about expressionBuilder and SearchProfiles because there are many of them , each one have it is own usage depending of the data you intended to return from solr.

hope this is give you idea where to look and do your solution.

Thanks

Abed

于 2015-04-07T21:05:48.447 回答