Examples of ProductsInCartService


Examples of com.ateam.webstore.service.impl.ProductsInCartService

    l.info("getting cart for session: "+req.getSession().getId());
   
    if (req.getParameter(Parameters.REMOVE.getId()) != null) {
      String removeId = req.getParameter(Parameters.REMOVE.getId());
      l.info("removing cart item "+removeId+" for session: "+req.getSession().getId());
      ProductsInCartService pics = new ProductsInCartService();
      ProductsInCart pic = pics.getById(new Long(removeId));
      pics.remove(pic);
      updateCart();
    }
     
    CartView cv = new CartView(getMainView());
   
View Full Code Here

Examples of com.ateam.webstore.service.impl.ProductsInCartService

          if (name.endsWith(Constants.Parameters.PRODUCT_QUANTITY.getId())) {
            String[] parts = name.split("_");
            Integer quantity = Integer.parseInt(req.getParameter(name));           
            String id = parts[0];
            l.fine("updating qty for "+id);
            ProductsInCartService pics = new ProductsInCartService();
            ProductsInCart pic = pics.getById(new Long(id));
           
            if (quantity == 0) {
              pics.remove(pic);             
            }
            else {
              pic.setQuantity(quantity);
              pics.store(pic);
            }
          }
        }
        updateCart();
        fs.setResultView(getCartView());     
View Full Code Here

Examples of com.ateam.webstore.service.impl.ProductsInCartService

  }
 
  public FormSubmission moveSelectedToWishList() {

    WishListHandler wlh = new WishListHandler(req);
    ProductsInCartService pics = new ProductsInCartService();
    FormSubmission fs = new FormSubmission();
   
    int i = 0;
   
    for (ProductsInCart p : cart.getProducts()) {
      String prodId = p.getProduct().getId()+"";
      if (req.getParameter(prodId) != null) {
        l.fine("moving prodId :"+prodId+" to wish list");
        wlh.addProduct(prodId);
        pics.remove(p);
        i++;
      }
    }
   
    if (i > 0) {
View Full Code Here

Examples of com.ateam.webstore.service.impl.ProductsInCartService

  /**
   *
   */
  public void delete() {
    l.info("Deleting user cart ");
    ProductsInCartService pics = new ProductsInCartService();
   
    for (ProductsInCart p : cart.getProducts()) {
      l.fine("deleting prodId :"+p.getId()+" from cart");
      pics.remove(p);
    }
   
    service.remove(cart);
    updateCart();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.