Package org.broadleafcommerce.core.order.domain

Examples of org.broadleafcommerce.core.order.domain.FulfillmentGroupItemImpl


        List<OrderItem> items = new ArrayList<OrderItem>();
        items.add(item);
        order.setOrderItems(items);

        FulfillmentGroupItem fgItem = new FulfillmentGroupItemImpl();
        fgItem.setFulfillmentGroup(group);
        fgItem.setOrderItem(item);
        fgItem.setQuantity(1);
        //fgItem.setPrice(new Money(0D));
        group.addFulfillmentGroupItem(fgItem);
    }
View Full Code Here


        item.setOrder(order);
       
        item = (DiscreteOrderItem) orderItemService.saveOrderItem(item);
       
        order.addOrderItem(item);
        FulfillmentGroupItem fgItem = new FulfillmentGroupItemImpl();
        fgItem.setFulfillmentGroup(group);
        fgItem.setOrderItem(item);
        fgItem.setQuantity(2);
        //fgItem.setPrice(new Money(0D));
        group.addFulfillmentGroupItem(fgItem);
        }
       
        {
        DiscreteOrderItem item = new DiscreteOrderItemImpl();
        Sku sku = new SkuImpl();
        sku.setName("Test Product 2");
        sku.setRetailPrice(new Money(20D));
        sku.setDiscountable(true);
       
        sku = catalogService.saveSku(sku);
       
        item.setSku(sku);
        item.setQuantity(1);
        item.setOrder(order);
       
        item = (DiscreteOrderItem) orderItemService.saveOrderItem(item);
       
        order.addOrderItem(item);
       
        FulfillmentGroupItem fgItem = new FulfillmentGroupItemImpl();
        fgItem.setFulfillmentGroup(group);
        fgItem.setOrderItem(item);
        fgItem.setQuantity(1);
        //fgItem.setPrice(new Money(0D));
        group.addFulfillmentGroupItem(fgItem);
        }
       
        order.addOfferCode(createOfferCode("20 Percent Off Item Offer", OfferType.ORDER_ITEM, OfferDiscountType.PERCENT_OFF, 20, null, "discreteOrderItem.sku.name==\"Test Sku\""));
View Full Code Here

       
        List<OrderItem> items = new ArrayList<OrderItem>();
        items.add(item);
        order.setOrderItems(items);
        for (OrderItem orderItem : items) {
            FulfillmentGroupItem fgi = new FulfillmentGroupItemImpl();
            fgi.setOrderItem(orderItem);
            fgi.setQuantity(orderItem.getQuantity());
            fgi.setFulfillmentGroup(group1);
            //fgi.setRetailPrice(new Money(15D));
            group1.addFulfillmentGroupItem(fgi);
        }
        order.setTotalShipping(new Money(0D));
       
View Full Code Here

        List<OrderItem> items = new ArrayList<OrderItem>();
        items.add(item);
        order.setOrderItems(items);

        FulfillmentGroupItem fgItem = new FulfillmentGroupItemImpl();
        fgItem.setFulfillmentGroup(group);
        fgItem.setOrderItem(item);
        fgItem.setQuantity(1);
        //fgItem.setPrice(new Money(0D));
        group.addFulfillmentGroupItem(fgItem);
    }
View Full Code Here

        return new IAnswer<FulfillmentGroup>() {
            @Override
            public FulfillmentGroup answer() throws Throwable {
                FulfillmentGroupItemRequest fgItemRequest = (FulfillmentGroupItemRequest) EasyMock.getCurrentArguments()[0];
                FulfillmentGroup fg = fgItemRequest.getFulfillmentGroup();
                FulfillmentGroupItem fgItem = new FulfillmentGroupItemImpl();
                fgItem.setOrderItem(fgItemRequest.getOrderItem());
                fgItem.setQuantity(fgItemRequest.getQuantity());
                fg.getFulfillmentGroupItems().add(fgItem);
               
                return fg;
            }
        };
View Full Code Here

    public static IAnswer<FulfillmentGroupItem> getCreateFulfillmentGroupItemAnswer() {
        return new IAnswer<FulfillmentGroupItem>() {
            @Override
            public FulfillmentGroupItem answer() throws Throwable {
                return new FulfillmentGroupItemImpl();
            }
        };
    }
View Full Code Here

        fg1.setRetailShippingPrice(new Money(10D));
        fg1.setShippingPrice(new Money(10D));
        fg1.setType(FulfillmentType.PHYSICAL_SHIP);
        fg1.setOrder(order);
       
        FulfillmentGroupItem fgItem1 = new FulfillmentGroupItemImpl();
        fgItem1.setFulfillmentGroup(fg1);
        fgItem1.setOrderItem(orderItem1);
        fgItem1.setQuantity(2);
        //fgItem1.setRetailPrice(new Money(19.99D));
        fg1.getFulfillmentGroupItems().add(fgItem1);
       
        order.getFulfillmentGroups().add(fg1);
       
        FulfillmentGroup fg2 = new FulfillmentGroupImpl();
        fg2.setId(2L);
        Address address2 = new AddressImpl();
        address2.setAddressLine1("124 Test Road");
        address2.setCity("Dallas");
       
        Country country2 = new CountryImpl();
        country2.setAbbreviation("US");
        country2.setName("United States");
       
        address2.setCountry(country2);
        address2.setDefault(true);
        address2.setFirstName("John");
        address2.setLastName("Tester");
        address2.setPostalCode("75244");

        Phone primary2 = new PhoneImpl();
        primary2.setPhoneNumber("972-976-1234");
        address2.setPhonePrimary(primary2);
       
        State state2 = new StateImpl();
        state2.setAbbreviation("TX");
        state2.setCountry(country2);
        state2.setName("Texas");
       
        address2.setState(state2);
        fg2.setAddress(address2);
        fg2.setOrder(order);
        fg2.setPrimary(true);
        fg2.setRetailShippingPrice(new Money(20D));
        fg2.setShippingPrice(new Money(20D));
        fg2.setType(FulfillmentType.PHYSICAL_SHIP);
        fg2.setOrder(order);
       
        FulfillmentGroupItem fgItem2 = new FulfillmentGroupItemImpl();
        fgItem2.setFulfillmentGroup(fg2);
        fgItem2.setOrderItem(orderItem2);
        fgItem2.setQuantity(3);
        //fgItem2.setRetailPrice(new Money(29.99D));
        fg2.getFulfillmentGroupItems().add(fgItem2);
       
        order.getFulfillmentGroups().add(fg2);
       
View Full Code Here

        fg1.setRetailShippingPrice(new Money(10D));
        fg1.setShippingPrice(new Money(10D));
        fg1.setType(FulfillmentType.PHYSICAL_SHIP);
        fg1.setOrder(order);

        FulfillmentGroupItem fgItem1 = new FulfillmentGroupItemImpl();
        fgItem1.setFulfillmentGroup(fg1);
        fgItem1.setOrderItem(orderItem1);
        fgItem1.setQuantity(2);
        //fgItem1.setRetailPrice(new Money(19.99D));
        fg1.getFulfillmentGroupItems().add(fgItem1);

        order.getFulfillmentGroups().add(fg1);

        FulfillmentGroup fg2 = new FulfillmentGroupImpl();
        fg2.setId(2L);
        Address address2 = new AddressImpl();
        address2.setAddressLine1("124 Test Road");
        address2.setCity("Dallas");

        Country country2 = new CountryImpl();
        country2.setAbbreviation("US");
        country2.setName("United States");

        address2.setCountry(country2);
        address2.setDefault(true);
        address2.setFirstName("John");
        address2.setLastName("Tester");
        address2.setPostalCode("75244");

        Phone primary2 = new PhoneImpl();
        primary2.setPhoneNumber("972-976-1234");
        address2.setPhonePrimary(primary2);

        State state2 = new StateImpl();
        state2.setAbbreviation("TX");
        state2.setCountry(country2);
        state2.setName("Texas");

        address2.setState(state2);
        fg2.setAddress(address2);
        fg2.setOrder(order);
        fg2.setPrimary(true);
        fg2.setRetailShippingPrice(new Money(20D));
        fg2.setShippingPrice(new Money(20D));
        fg2.setType(FulfillmentType.PHYSICAL_SHIP);
        fg2.setOrder(order);

        FulfillmentGroupItem fgItem2 = new FulfillmentGroupItemImpl();
        fgItem2.setFulfillmentGroup(fg2);
        fgItem2.setOrderItem(orderItem2);
        fgItem2.setQuantity(3);
        //fgItem2.setRetailPrice(new Money(29.99D));
        fg2.getFulfillmentGroupItems().add(fgItem2);

        order.getFulfillmentGroups().add(fg2);
View Full Code Here

        item1.setOrderItemType(OrderItemType.DISCRETE);

        item1 = (DiscreteOrderItem) orderItemService.saveOrderItem(item1);

        order.addOrderItem(item1);
        FulfillmentGroupItem fgItem = new FulfillmentGroupItemImpl();
        fgItem.setFulfillmentGroup(group);
        fgItem.setOrderItem(item1);
        fgItem.setQuantity(2);
        //fgItem.setPrice(new Money(0D));
        group.addFulfillmentGroupItem(fgItem);
        }

        {
        DiscreteOrderItem item = new DiscreteOrderItemImpl();
        Sku sku = new SkuImpl();
        sku.setName("Test Product 2");
        sku.setRetailPrice(new Money(20D));
        sku.setDiscountable(true);

        sku = catalogService.saveSku(sku);

        item.setSku(sku);
        item.setQuantity(1);
        item.setOrder(order);
        item.setOrderItemType(OrderItemType.DISCRETE);

        item = (DiscreteOrderItem) orderItemService.saveOrderItem(item);

        order.addOrderItem(item);

        FulfillmentGroupItem fgItem = new FulfillmentGroupItemImpl();
        fgItem.setFulfillmentGroup(group);
        fgItem.setOrderItem(item);
        fgItem.setQuantity(1);
        //fgItem.setPrice(new Money(0D));
        group.addFulfillmentGroupItem(fgItem);
        }

        {
        GiftWrapOrderItem item = new GiftWrapOrderItemImpl();
        Sku sku = new SkuImpl();
        sku.setName("Test GiftWrap");
        sku.setRetailPrice(new Money(1D));
        sku.setDiscountable(true);

        sku = catalogService.saveSku(sku);

        item.setSku(sku);
        item.setQuantity(1);
        item.setOrder(order);
        item.getWrappedItems().add(item1);
        item.setOrderItemType(OrderItemType.GIFTWRAP);

        item = (GiftWrapOrderItem) orderItemService.saveOrderItem(item);

        order.addOrderItem(item);

        FulfillmentGroupItem fgItem = new FulfillmentGroupItemImpl();
        fgItem.setFulfillmentGroup(group);
        fgItem.setOrderItem(item);
        fgItem.setQuantity(1);
        //fgItem.setPrice(new Money(0D));
        group.addFulfillmentGroupItem(fgItem);
        }

        return order;
View Full Code Here

                orderItem.getSku().setWeight(weight);
                orderItem.setPrice(new Money(BigDecimal.ZERO));
            }
            orderItem.setOrder(result);

            FulfillmentGroupItem fulfillmentItem = new FulfillmentGroupItemImpl();
            fulfillmentItem.setOrderItem(orderItem);
            if (quantities == null) {
                fulfillmentItem.setQuantity(1);
            } else {
                fulfillmentItem.setQuantity(quantities[i]);
            }

            fulfillmentItems.add(fulfillmentItem);
        }
View Full Code Here

TOP

Related Classes of org.broadleafcommerce.core.order.domain.FulfillmentGroupItemImpl

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.