Package org.simplecart.contract.salesorder

Examples of org.simplecart.contract.salesorder.SalesOrderLineItem


        // create a sample order
        InternetSalesOrder salesOrder = new InternetSalesOrder();
        salesOrder.setAddress(orderAddress);
        salesOrder.setNotes("TEST NOTES!");
        salesOrder.setPlacedOn(new Date());
        salesOrder.addLineItem(new SalesOrderLineItem((float)3,(float)3.64,"line 1",option1));
        salesOrder.addLineItem(new SalesOrderLineItem((float)6,(float)4.91,"line 2",option2));

        // associate order
        customer.addOrder(salesOrder);
       
        cdao.makePersistent(customer);
View Full Code Here


       
        // create the line items and add to order
        Shopcart shopcart = (Shopcart) session.getAttribute(Constants.SHOPCART);
        Iterator cartItems = shopcart.getItems().iterator();
        ShopcartItem currentItem;
        SalesOrderLineItem currentLineItem;
        ProductOption currentOption;

        // get a DAO for the new Stake
        InternetProductOptionDAO optionDAO = new InternetProductOptionDAO();
       
        while (cartItems.hasNext()) {
            currentItem = (ShopcartItem) cartItems.next();
            currentOption = optionDAO.findById(currentItem.getOptionId(),false);
            currentLineItem =
              new SalesOrderLineItem(
                    currentItem.getAmount(),
                    currentItem.getPrice(),
                    currentItem.getComment(),
                    currentOption);
            newOrder.getLineItems().add(currentLineItem);
View Full Code Here

TOP

Related Classes of org.simplecart.contract.salesorder.SalesOrderLineItem

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.