Package org.broadleafcommerce.core.order.domain

Examples of org.broadleafcommerce.core.order.domain.BundleOrderItemImpl$Presentation


        category2.getAllProductXrefs().add(xref2);

        ProductBundle pb = new ProductBundleImpl();
        pb.setPricingModel(ProductBundlePricingModelType.ITEM_SUM);

        BundleOrderItem bundleOrderItem = new BundleOrderItemImpl();
        bundleOrderItem.setCategory(category1);
        bundleOrderItem.setName("test1");
        bundleOrderItem.setOrder(order);
        bundleOrderItem.setOrderItemType(OrderItemType.DISCRETE);
        bundleOrderItem.setQuantity(2);
        bundleOrderItem.setId(getOrderItemId());
        bundleOrderItem.setOrder(order);
        bundleOrderItem.setRetailPrice(new Money(10D));
        bundleOrderItem.setProductBundle(pb);

        OrderItemPriceDetail priceDetail = new OrderItemPriceDetailImpl();
        priceDetail.setOrderItem(bundleOrderItem);
        priceDetail.setQuantity(2);
        bundleOrderItem.getOrderItemPriceDetails().add(priceDetail);

        order.getOrderItems().add(bundleOrderItem);

        DiscreteOrderItem orderItem1 = new DiscreteOrderItemImpl();
        orderItem1.setCategory(category1);
        orderItem1.setName("test1");
        orderItem1.setOrder(order);
        orderItem1.setOrderItemType(OrderItemType.DISCRETE);
        orderItem1.setProduct(product1);
        orderItem1.setQuantity(2);
        orderItem1.setSku(sku1);
        orderItem1.setId(getOrderItemId());
        orderItem1.setOrder(order);

        OrderItemPriceDetail priceDetail1 = new OrderItemPriceDetailImpl();
        priceDetail1.setOrderItem(orderItem1);
        priceDetail1.setQuantity(2);
        orderItem1.getOrderItemPriceDetails().add(priceDetail1);

        bundleOrderItem.getDiscreteOrderItems().add(orderItem1);

        DiscreteOrderItem orderItem2 = new DiscreteOrderItemImpl();
        orderItem2.setCategory(category2);
        orderItem2.setName("test2");
        orderItem2.setOrder(order);
        orderItem2.setOrderItemType(OrderItemType.DISCRETE);
        orderItem2.setProduct(product2);
        orderItem2.setQuantity(3);
        orderItem2.setSku(sku2);
        orderItem2.setId(getOrderItemId());
        orderItem2.setOrder(order);

        OrderItemPriceDetail priceDetail2 = new OrderItemPriceDetailImpl();
        priceDetail2.setOrderItem(orderItem2);
        priceDetail2.setQuantity(3);
        orderItem2.getOrderItemPriceDetails().add(priceDetail2);

        bundleOrderItem.getDiscreteOrderItems().add(orderItem2);

        Customer customer = new CustomerImpl();
        customer.setEmailAddress("test@test.com");
        customer.setFirstName("John");
        customer.setLastName("Tester");
View Full Code Here

TOP

Related Classes of org.broadleafcommerce.core.order.domain.BundleOrderItemImpl$Presentation

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.