Package org.hoteia.qalingo.core.pojo.cart

Examples of org.hoteia.qalingo.core.pojo.cart.FoCartItemPojo


        logger.debug("post writing destination value, SourceObject: " + event.getSourceObject());
        if(event.getDestinationObject() instanceof FoCartItemPojo){
            if(event.getFieldMap().getDestFieldName().equals("productSkuCode")){
                // INJECT BACKOFFICE URLS
                CartItem cartItem = (CartItem) event.getSourceObject();
                FoCartItemPojo cartItemPojo = (FoCartItemPojo) event.getDestinationObject();
                try {
                    final RequestData requestData = requestUtil.getRequestData(httpServletRequest);
                    final MarketArea marketArea = requestData.getMarketArea();
                    final Retailer retailer = requestData.getMarketAreaRetailer();
                    final Localization localization = requestData.getMarketAreaLocalization();
                    final String localizationCode = localization.getCode();
                   
                    final Asset defaultPackshotImage = cartItem.getProductSku().getDefaultPackshotImage(ImageSize.SMALL.name());
                    if (defaultPackshotImage != null) {
                        String summaryImage = engineSettingService.getProductMarketingImageWebPath(defaultPackshotImage);
                        cartItemPojo.setSummaryImage(summaryImage);
                    } else {
                        cartItemPojo.setSummaryImage("");
                    }
                   
                    cartItemPojo.setI18nName(cartItem.getProductSku().getI18nName(localizationCode));
                   
                    cartItemPojo.setProductDetailsUrl(urlService.generateUrl(FoUrls.PRODUCT_DETAILS, requestData, cartItem.getCatalogCategory(), cartItem.getProductMarketing(), cartItem.getProductSku()));

                    cartItemPojo.setPriceWithStandardCurrencySign(cartItem.getPriceWithStandardCurrencySign(marketArea.getId(), retailer.getId()));
                    cartItemPojo.setTotalAmountWithStandardCurrencySign(cartItem.getTotalAmountWithStandardCurrencySign(marketArea.getId(), retailer.getId()));

                } catch (Exception e) {
                    logger.error("postWritingDestinationValue error with FoCartItemPojo", e);
                }
            }
View Full Code Here


public class CartCustomBeanFactory implements BeanFactory  {

    @Override
    public Object createBean(Object source, Class<?> sourceClass, String targetBeanId) {
        return new FoCartItemPojo();
    }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.pojo.cart.FoCartItemPojo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.