Examples of CartItem


Examples of net.fqsc.inscriptions.model.inscriptions.CartItem

  }

  @Override
  protected void populateItem(final ListItem item)
  {
    final CartItem cartItem = (CartItem) item.getModelObject();
    Tarification tarification = catPartCtrl.getTarificationByOid(cartItem
        .getTarificationOid().getUniqueNumber());

    item.add(new Label("evenementNom", new PropertyModel(tarification
        .getCourse().getEvenement(), "nom")));
    item.add(new Label("discipline", new PropertyModel(tarification
View Full Code Here

Examples of net.fqsc.inscriptions.model.inscriptions.CartItem

      {
        watch.start();

        Cart cart = new Cart(context.getPersistentModel()
            .getDomainModel());
        cart.addToCart(new CartItem(this.getRandomTarification()
            .getOid(), context.getPersistentModel()
            .getDomainModel()));

        Club club = (Club) clubCtrl.getClubs().get(
            random.nextInt(clubCtrl.getClubs().size()));
        cart.setClubOid(club.getOid().getUniqueNumber().toString());
        cart.setCommenditaire(RandomStringUtils.randomAlphabetic(10));

        if (i % 10 == 0)
        {
          for (int j = 0; j < 5; j++)
          {
            cart.addToCart(new CartItem(this
                .getRandomTarification().getOid(), context
                .getPersistentModel().getDomainModel()));
          }
        }
View Full Code Here

Examples of net.fqsc.inscriptions.model.inscriptions.CartItem

    Inscription inscription = null;

    for (final Iterator i = cart.getCart().iterator(); i.hasNext();)
    {

      final CartItem cartItem = (CartItem) i.next();
      final Tarification tarification = catPartCtrl
          .getTarificationByOid(cartItem.getTarificationOid()
              .getUniqueNumber());

      inscription = null;

      inscription = this.inscriptionsCtrl.inscrire(cart
          .getCommenditaire(), tarification.getCourse(), personne,
          tarification.getCategorie(), clubCtrl.getClubByOid(cart
              .getClubOid()));

      this.addFactureItem(facture, inscription, catPartCtrl
          .getTarificationByOid(
              cartItem.getTarificationOid().getUniqueNumber())
          .getPrix());

    }

    return facture;
View Full Code Here

Examples of net.fqsc.inscriptions.model.inscriptions.CartItem

        if (!tarification.equals(null))
        {
          InscriptionsApp app = (InscriptionsApp) this
              .getApplication();
          session.getCart().addToCart(
              new CartItem(tarification.getOid(),
              app.getDbContext().getPersistentModel()
                  .getDomainModel()));
        }

        this
View Full Code Here

Examples of net.fqsc.inscriptions.model.inscriptions.CartItem

        for (final Iterator i = session.getCart().getCart().iterator(); i
            .hasNext();)
        {

          final CartItem cartItem = (CartItem) i.next();

          if (cartItem.isMarkedForRemoval())
          {
            i.remove();
          }

        }
View Full Code Here

Examples of net.fqsc.inscriptions.model.inscriptions.CartItem

  }

  @Override
  protected void populateItem(final ListItem item)
  {
    final CartItem cartItem = (CartItem) item.getModelObject();
    Tarification tarification = catPartCtrl.getTarificationByOid(cartItem
        .getTarificationOid().getUniqueNumber());

    item.add(new Label("evenementNom", new PropertyModel(tarification
        .getCourse().getEvenement(), "nom")));
    item.add(new Label("discipline", new PropertyModel(tarification
View Full Code Here

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

                    } else if (param instanceof ProductBrand) {
                        ProductBrand productBrand = (ProductBrand) param;
                        urlParams.put(RequestConstants.URL_PATTERN_BRAND_CODE, handleParamValue(productBrand.getCode()));
                        urlStr = addFullPrefixUrl(requestData, urlStr) + handleParamValue(productBrand.getName()) + "/";
                    } else if (param instanceof CartItem) {
                        CartItem cartItem = (CartItem) param;
                        urlParams.put(RequestConstants.URL_PATTERN_CART_ITEM_CODE, handleParamValue(cartItem.getId().toString()));
                    else if (param instanceof Store) {
                        Store store = (Store) param;
                        urlParams.put(RequestConstants.URL_PATTERN_STORE_CODE, handleParamValue(store.getCode().toString()));
                    } else if (param instanceof Map) {
                        getParams = (Map<String, String>) param;
View Full Code Here

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

                orderShipment.setPrice(deliveryMethod.getPrice(cart.getCurrency().getId()));
               
                Set<CartItem> cartItems = cart.getCartItems();
                Set<OrderItem> orderItems = new HashSet<OrderItem>();
                for (Iterator<CartItem> iteratorCartItem = cartItems.iterator(); iteratorCartItem.hasNext();) {
                    CartItem cartItem = (CartItem) iteratorCartItem.next();
                    OrderItem orderItem = new OrderItem();
                    orderItem.setCurrency(cart.getCurrency());
                    orderItem.setProductSkuCode(cartItem.getProductSkuCode());
                    orderItem.setProductSku(cartItem.getProductSku());
                    orderItem.setPrice(cartItem.getPrice(cart.getMarketAreaId(), cart.getRetailerId()).getSalePrice());
                    orderItem.setQuantity(cartItem.getQuantity());
                   
                    // TAXES
                    Set<CartItemTax> taxes = cartItem.getTaxes();
                    if(taxes != null){
                        for (Iterator<CartItemTax> iteratorCartItemTax = taxes.iterator(); iteratorCartItemTax.hasNext();) {
                            CartItemTax cartItemTax = (CartItemTax) iteratorCartItemTax.next();
                            OrderTax orderTax = new OrderTax();
                            orderTax.setName(cartItemTax.getTax().getName());
View Full Code Here

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

   
    public CartPojo handleCartMapping(final Cart cart, final String catalogVirtualCode, final String catalogMasterCode) {
        if(cart != null){
            Set<CartItem> cartItems = cart.getCartItems();
            for (Iterator<CartItem> iterator = cartItems.iterator(); iterator.hasNext();) {
                CartItem cartItem = (CartItem) iterator.next();
                if(cartItem.getProductSku() == null){
                    final ProductSku productSku = productService.getProductSkuByCode(cartItem.getProductSkuCode());
                    cartItem.setProductSku(productSku);
                }
                if(cartItem.getProductMarketing() == null){
                    final ProductMarketing productMarketing = productService.getProductMarketingByCode(cartItem.getProductMarketingCode());
                    cartItem.setProductMarketing(productMarketing);
                }
                if(cartItem.getCatalogCategory() == null){
                    final CatalogCategoryVirtual catalogCategory = catalogCategoryService.getVirtualCatalogCategoryByCode(cartItem.getCatalogCategoryCode(), catalogVirtualCode, catalogMasterCode);
                    cartItem.setCatalogCategory(catalogCategory);
                }
            }
        }
        return cart == null ? null : dozerBeanMapper.map(cart, CartPojo.class);
    }
View Full Code Here

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

    public void addProductSkuToCart(Cart cart, Retailer retailer, final String catalogCategoryCode, final String productSkuCode, final int quantity) throws Exception {
        int finalQuantity = quantity;
        if (cart != null) {
            Set<CartItem> cartItems = cart.getCartItems();
            for (Iterator<CartItem> iterator = cartItems.iterator(); iterator.hasNext();) {
                CartItem cartItem = (CartItem) iterator.next();
                if (cartItem.getProductSkuCode().equalsIgnoreCase(productSkuCode)
                        && cartItem.getRetailerId().equals(retailer)) {
                    finalQuantity = finalQuantity + cartItem.getQuantity();
                }
            }
        }
        updateCartItem(cart, retailer, catalogCategoryCode, productSkuCode, finalQuantity);
    }
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.