Package com.jada.content.checkout

Examples of com.jada.content.checkout.ShoppingCartActionForm


        throws Throwable {
     
      init(request);
      ContentBean contentBean = getContentBean(request);
      Site site = contentBean.getContentSessionBean().getSiteDomain().getSite();
      ShoppingCartActionForm form = (ShoppingCartActionForm) actionForm;
      ShoppingCart shoppingCart = ShoppingCart.getSessionInstance(request, true);
      ActionMessages messages = new ActionMessages();
    shoppingCart.removeItem(form.getItemNaturalKey(), contentBean);
    this.initAddressInfo(form, site, shoppingCart, request, messages);
    this.initCartInfo(form, site, shoppingCart, request, messages);
   
    if (shoppingCart.isShippingQuoteLock()) {
      this.saveOpenOrder(shoppingCart, Constants.ORDER_STEP_QUOTE_REVIEWPURCHASE);
View Full Code Here


        throws Throwable {
     
      init(request);
      ContentBean contentBean = getContentBean(request);
      Site site = contentBean.getContentSessionBean().getSiteDomain().getSite();
      ShoppingCartActionForm form = (ShoppingCartActionForm) actionForm;
      ShoppingCart shoppingCart = ShoppingCart.getSessionInstance(request, true);
      ActionMessages messages = new ActionMessages();
    this.initAddressInfo(form, site, shoppingCart, request, messages);
      this.initCartInfo(form, site, shoppingCart, request, messages);
    shoppingCart.removeCoupon(Format.getLong(form.getCouponId()), contentBean);
   
    if (shoppingCart.isShippingQuoteLock()) {
      this.saveOpenOrder(shoppingCart, Constants.ORDER_STEP_QUOTE_REVIEWPURCHASE);
    }
    else {
View Full Code Here

        throws Throwable {
     
      init(request);
      ContentBean contentBean = getContentBean(request);
      Site site = contentBean.getContentSessionBean().getSiteDomain().getSite();
      ShoppingCartActionForm form = (ShoppingCartActionForm) actionForm;
      ShoppingCart shoppingCart = ShoppingCart.getSessionInstance(request, true);
      ActionMessages messages = new ActionMessages();
    this.initAddressInfo(form, site, shoppingCart, request, messages);
      this.initCartInfo(form, site, shoppingCart, request, messages);
      Language language = contentBean.getContentSessionBean().getSiteProfile().getSiteProfileClass().getLanguage();
      boolean hasError = validateUpdateQty(form, getContentBean(request));
      if (hasError) {
          String itemNaturalKeys[] = form.getItemNaturalKeys();
          String itemQtys[] = form.getItemQtys();
        for (int i = 0; i < itemNaturalKeys.length; i++) {
          ShoppingCartItemBean bean = (ShoppingCartItemBean) form.getShoppingCartItemInfos().elementAt(i);
          bean.setItemQty(itemQtys[i]);
        }
      }
      else {
          String itemNaturalKeys[] = form.getItemNaturalKeys();
          String itemQtys[] = form.getItemQtys();
          if (itemNaturalKeys != null) {
            for (int i = 0; i < itemNaturalKeys.length; i++) {
              int qty = 0;
              if (itemQtys[i].trim().length() != 0) {
                qty = Format.getInt(itemQtys[i]);
              }
          Item item = DataApi.getInstance().getItem(site.getSiteId(), itemNaturalKeys[i]);
          try {
            shoppingCart.setItemQty(item, qty, null, contentBean, true);
            } catch (ItemNotAvailiableException itemNotAvailiableException) {
              String value = Languages.getLangTranValue(language.getLangId(), "content.text.itemQuatityNotAvailable");
              ShoppingCartItemBean itemInfo = (ShoppingCartItemBean) form.getShoppingCartItemInfos().elementAt(i);
              itemInfo.setItemQtyError(value);
              hasError = true;
            }
            }
        }
View Full Code Here

TOP

Related Classes of com.jada.content.checkout.ShoppingCartActionForm

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.