Package org.hoteia.qalingo.core.domain

Examples of org.hoteia.qalingo.core.domain.Cart


                // INJECT BACKOFFICE URLS
                DeliveryMethod deliveryMethod = (DeliveryMethod) event.getSourceObject();
                FoDeliveryMethodPojo deliveryMethodPojo = (FoDeliveryMethodPojo) event.getDestinationObject();
                try {
                    final RequestData requestData = requestUtil.getRequestData(httpServletRequest);
                    final Cart cart = requestData.getCart();
                   
                    deliveryMethodPojo.setArrivalTime("??");
                    deliveryMethodPojo.setPrice(deliveryMethod.getPrice(cart.getCurrency().getId()));
                    deliveryMethodPojo.setPriceWithStandardCurrencySign(deliveryMethod.getPriceWithStandardCurrencySign(cart.getCurrency().getId()));

                    if(cart != null
                            && cart.getDeliveryMethods().contains(deliveryMethod)){
                        deliveryMethodPojo.setSelected(true);
                    }
                } catch (Exception e) {
                    logger.error("postWritingDestinationValue error with FoDeliveryMethodPojo", e);
                }
View Full Code Here


        modelAndView.addObject(ModelConstants.SEARCH_FORM, formFactory.buildSearchForm(requestData));

        loadRecentProducts(request, requestData, model, new FetchPlan(categoryVirtualFetchPlans), new FetchPlan(productMarketingFetchPlans), new FetchPlan(productSkuFetchPlans));

        final Cart currentCart = requestData.getCart();
        final CartViewBean cartViewBean = frontofficeViewBeanFactory.buildViewBeanCart(requestUtil.getRequestData(request), currentCart);
        modelAndView.addObject(ModelConstants.CART_VIEW_BEAN, cartViewBean);

        return modelAndView;
    }
View Full Code Here

        // SANITY CHECK : quantity is equal zero : no sense
        if (quantity == 0) {
            throw new Exception("");
        }

        final Cart cart = requestData.getCart();
//        int finalQuantity = quantity;
//        if(cart != null){
//            Set<CartItem> cartItems = cart.getCartItems();
//            for (Iterator<CartItem> iterator = cartItems.iterator(); iterator.hasNext();) {
//                CartItem cartItem = (CartItem) iterator.next();
View Full Code Here

        // SANITY CHECK : quantity is equal zero : no sense
        if (quantity == 0) {
            throw new Exception("");
        }

        Cart cart = requestData.getCart();
        if(cart == null){
            EngineEcoSession engineEcoSession = requestUtil.getCurrentEcoSession(request);
            cart = engineEcoSession.addNewCart();
        }
       
View Full Code Here

    /**
     *
     */
    public void updateCart(final RequestData requestData, final Customer customer) throws Exception {
        final HttpServletRequest request = requestData.getRequest();
        Cart cart = requestData.getCart();
        if(cart != null){
            cart.setCustomerId(customer.getId());
            cart.setBillingAddressId(customer.getDefaultBillingAddressId());
            cart.setShippingAddressId(customer.getDefaultShippingAddressId());
        }
        requestUtil.updateCurrentCart(request, cart);
    }
View Full Code Here

    /**
     *
     */
    public void updateCart(final RequestData requestData, final Long billingAddressId, final Long shippingAddressId) throws Exception {
        final HttpServletRequest request = requestData.getRequest();
        Cart cart = requestData.getCart();
        if(cart != null){
            cart.setBillingAddressId(billingAddressId);
            cart.setShippingAddressId(shippingAddressId);
        }
        requestUtil.updateCurrentCart(request, cart);
    }
View Full Code Here

    /**
     *
     */
    public void deleteCartItem(final RequestData requestData, final Retailer retailer, final String productSkuCode) throws Exception {
        final HttpServletRequest request = requestData.getRequest();
        Cart cart = requestData.getCart();
        Cart savedCart = cartService.deleteCartItem(cart, retailer, productSkuCode);
        requestUtil.updateCurrentCart(request, savedCart);
    }
View Full Code Here

     *
     */
    public void setShippingAddress(final RequestData requestData, final String customerShippingAddressId) throws Exception {
        final HttpServletRequest request = requestData.getRequest();
        Customer customer = requestData.getCustomer();
        Cart cart = requestData.getCart();
        Long customerAddressId = Long.parseLong(customerShippingAddressId);
        cartService.setShippingAddress(cart, customer, customerAddressId);
        requestUtil.updateCurrentCart(request, cart);
    }
View Full Code Here

     *
     */
    public void setBillingAddress(final RequestData requestData, final String customerBillingAddressId) throws Exception {
        final HttpServletRequest request = requestData.getRequest();
        Customer customer = requestData.getCustomer();
        Cart cart = requestData.getCart();
        Long customerAddressId = Long.parseLong(customerBillingAddressId);
        cartService.setBillingAddress(cart, customer, customerAddressId);
        requestUtil.updateCurrentCart(request, cart);
    }
View Full Code Here

    /**
     *
     */
    public void setDeliveryMethod(final RequestData requestData, final String deliveryMethodCode) throws Exception {
        final HttpServletRequest request = requestData.getRequest();
        Cart cart = requestData.getCart();
        cartService.setDeliveryMethod(cart, deliveryMethodCode);
        requestUtil.updateCurrentCart(request, cart);
    }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.domain.Cart

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.