/**
*
*/
protected CartItemViewBean buildViewBeanCartItem(final RequestData requestData, final CartItem cartItem, final FetchPlan productSkuFetchPlan) throws Exception {
final MarketArea marketArea = requestData.getMarketArea();
final Retailer retailer = requestData.getMarketAreaRetailer();
final Localization localization = requestData.getMarketAreaLocalization();
final String localizationCode = localization.getCode();
final CartItemViewBean cartItemViewBean = new CartItemViewBean();
cartItemViewBean.setSkuCode(cartItem.getProductSkuCode());
final ProductSku productSku = productService.getProductSkuByCode(cartItem.getProductSkuCode(), productSkuFetchPlan);
cartItem.setProductSku(productSku);
cartItemViewBean.setI18nName(productSku.getI18nName(localizationCode));
cartItemViewBean.setQuantity(cartItem.getQuantity());
final Asset defaultPackshotImage = productSku.getDefaultPackshotImage(ImageSize.SMALL.name());
if (defaultPackshotImage != null) {
String summaryImage = engineSettingService.getProductMarketingImageWebPath(defaultPackshotImage);
cartItemViewBean.setSummaryImage(summaryImage);
} else {
cartItemViewBean.setSummaryImage("");
}
// UNIT PRICE
cartItemViewBean.setUnitPriceWithCurrencySign(cartItem.getPriceWithStandardCurrencySign(marketArea.getId(), retailer.getId()));
// FEES AMOUNT FOR THIS PRODUCT SKU AND THIS QUANTITY
//...
// TOTAL AMOUNT FOR THIS PRODUCT SKU AND THIS QUANTITY
cartItemViewBean.setAmountWithCurrencySign(cartItem.getTotalAmountWithStandardCurrencySign(marketArea.getId(), retailer.getId()));
Map<String, String> getParams = new HashMap<String, String>();
getParams.put(RequestConstants.REQUEST_PARAMETER_PRODUCT_SKU_CODE, cartItem.getProductSkuCode());
cartItemViewBean.setDeleteUrl(urlService.generateUrl(FoUrls.CART_REMOVE_ITEM, requestData, getParams));