Package org.hoteia.qalingo.core.domain

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


        Criteria criteria = createDefaultCriteria(Cart.class);
       
        FetchPlan fetchPlan = handleSpecificFetchMode(criteria);
       
        criteria.add(Restrictions.eq("id", cartId));
        Cart cart = (Cart) criteria.uniqueResult();
        if(cart != null){
            cart.setFetchPlan(fetchPlan);
        }
        return cart;
  }
View Full Code Here


        FetchPlan fetchPlan = handleSpecificFetchMode(criteria);
       
        criteria.add(Restrictions.eq("marketAreaId", marketAreaId));
        criteria.add(Restrictions.eq("customerId", customerId));

        Cart cart = (Cart) criteria.uniqueResult();
        if(cart != null){
            cart.setFetchPlan(fetchPlan);
        }
        return cart;
    }
View Full Code Here

    cart.setDateUpdate(new Date());
        if (cart.getId() != null) {
            if(em.contains(cart)){
                em.refresh(cart);
            }
            Cart mergedCart = em.merge(cart);
            em.flush();
            return mergedCart;
        } else {
            em.persist(cart);
            return cart;
View Full Code Here

                    customerPaymentInformation.setCustomerMarketAreaId(marketArea.getId());
                   
                    customerService.savePaymentInformation(customer, customerPaymentInformation);
                }

                Cart cart = cartService.getCartByMarketAreaIdAndCustomerId(marketArea.getId(), customer.getId());
               
                // Create and Save a new order
                checkoutService.checkout(customer, cart);
               
                // WebManagementService.buildAndSaveNewOrderConfirmationMail
View Full Code Here

      return displaySearch(request, model);
    }
   
    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);
   
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, FoUrls.CATALOG_SEARCH.getKey());
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

   
    @Autowired
    private Mapper dozerBeanMapper;
   
    public CartPojo getCart(MarketArea marketArea, Customer customer) throws Exception {
        Cart cart = cartService.getCartByMarketAreaIdAndCustomerId(marketArea.getId(), customer.getId());
        String catalogVirtualCode = marketArea.getCatalog().getCode();
        String catalogMasterCode = marketArea.getCatalog().getCatalogMaster().getCode();
        CartPojo cartPojo = handleCartMapping(cart, catalogVirtualCode, catalogMasterCode);
        return cartPojo;
    }
View Full Code Here

   
  @RequestMapping(FoUrls.CATEGORY_AS_LINE_URL)
  public ModelAndView productLine(final HttpServletRequest request, final Model model, @PathVariable(RequestConstants.URL_PATTERN_CATEGORY_CODE) final String categoryCode) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.CATEGORY_AS_LINE.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final Cart currentCart = requestData.getCart();
       
    final CatalogCategoryVirtual catalogCategory = catalogCategoryService.getVirtualCatalogCategoryByCode(categoryCode, requestData.getVirtualCatalogCode(), requestData.getMasterCatalogCode(), new FetchPlan(categoryVirtualFetchPlans));
   
    if(catalogCategory != null){
        final CatalogCategoryViewBean catalogCategoryViewBean = frontofficeViewBeanFactory.buildViewBeanVirtualCatalogCategory(requestUtil.getRequestData(request), catalogCategory,
View Full Code Here

      return displaySearch(request, model);
    }
   
    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);
   
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, FoUrls.STORE_SEARCH.getKey());
View Full Code Here

    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    public AddToCartPojoResponse addProductSkuToCart(AddToCartPojoRequest addToCartPojoRequest) throws Exception {
        AddToCartPojoResponse addToCartPojoResponse = new AddToCartPojoResponse();
       
        Cart cart;
        if(StringUtils.isNotEmpty(addToCartPojoRequest.getCartId())){
            cart = cartService.getCartById(addToCartPojoRequest.getCartId());
            String catalogCategoryCode = addToCartPojoRequest.getCatalogCategoryCode();
            String productSkuCode = addToCartPojoRequest.getProductSkuCode();
            int quantity = addToCartPojoRequest.getQuantity();
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.