Package org.hoteia.qalingo.core.domain

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


    public OrderCustomer buildAndSaveNewOrder(final RequestData requestData) throws Exception {
        final HttpServletRequest request = requestData.getRequest();
        final Customer customer = requestData.getCustomer();
        final Cart cart = requestData.getCart();
       
        OrderCustomer orderCustomer = checkoutService.checkout(customer, cart);
       
        requestUtil.deleteCurrentCartAndSaveEngineSession(request);

        // RELOAD ORDER FOR THE SESSION
        orderCustomer = orderCustomerService.getOrderByOrderNum(orderCustomer.getOrderNum());
        requestUtil.keepLastOrderInSession(requestData, orderCustomer);
       
        buildAndSaveNewOrderConfirmationMail(requestData, customer, orderCustomer);
       
        return orderCustomer;
View Full Code Here


  public ModelAndView orderDetails(final HttpServletRequest request, final Model model) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.ORDER_DETAILS.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
       
    final String orderNum = request.getParameter(RequestConstants.REQUEST_PARAMETER_ORDER_NUM);
    final OrderCustomer orderCustomer = orderCustomerService.getOrderByOrderNum(orderNum);
   
    if(orderCustomer != null){
          modelAndView.addObject(ModelConstants.ORDER_VIEW_BEAN, backofficeViewBeanFactory.buildViewBeanOrder(requestUtil.getRequestData(request), orderCustomer));
    } else {
      final String url = requestUtil.getLastRequestUrl(request);
      return new ModelAndView(new RedirectView(url));
    }
   
        model.addAttribute(ModelConstants.URL_BACK, backofficeUrlService.generateUrl(BoUrls.ORDER_LIST, requestData));
       
        Object[] params = {orderCustomer.getOrderNum()};
        overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, BoUrls.ORDER_DETAILS.getKey(), params);
   
        return modelAndView;
  }
View Full Code Here

   
    final List<OrderViewBean> orderViewBeans = new ArrayList<OrderViewBean>();

    final List<OrderCustomer> orderCustomers = orderCustomerService.findOrders();
    for (Iterator<OrderCustomer> iterator = orderCustomers.iterator(); iterator.hasNext();) {
      OrderCustomer orderCustomer = (OrderCustomer) iterator.next();
      orderViewBeans.add(backofficeViewBeanFactory.buildViewBeanOrder(requestUtil.getRequestData(request), orderCustomer));
    }
    orderViewBeanPagedListHolder = new PagedListHolder<OrderViewBean>(orderViewBeans);
    orderViewBeanPagedListHolder.setPageSize(Constants.PAGE_SIZE);
        request.getSession().setAttribute(sessionKey, orderViewBeanPagedListHolder);
View Full Code Here

                    } else if (param instanceof Tax) {
                        Tax tax = (Tax) param;
                        getParams.put(RequestConstants.REQUEST_PARAMETER_TAX_CODE, handleParamValue(tax.getCode().toString()));
                        break;
                    } else if (param instanceof OrderCustomer) {
                        OrderCustomer order = (OrderCustomer) param;
                        getParams.put(RequestConstants.REQUEST_PARAMETER_ORDER_NUM, handleParamValue(order.getOrderNum().toString()));
                        break;
                    } else if (param instanceof Customer) {
                        Customer customer = (Customer) param;
                        getParams.put(RequestConstants.REQUEST_PARAMETER_CUSTOMER_CODE, handleParamValue(customer.getCode().toString()));
                        break;
View Full Code Here

        ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.CART_ORDER_CONFIRMATION.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();

        // SANITY CHECK
        final OrderCustomer lastOrder = requestUtil.getLastOrder(requestData);
       
        if (lastOrder == null) {
            return new ModelAndView(new RedirectView(urlService.generateUrl(FoUrls.HOME, requestUtil.getRequestData(request))));
        }
View Full Code Here

TOP

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

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.