Package org.broadleafcommerce.core.offer.domain

Examples of org.broadleafcommerce.core.offer.domain.OfferInfo


        }

        for (OfferCode anonymousOffer : anonymousCart.getAddedOfferCodes()) {
            if (!customerOffersMap.containsKey(anonymousOffer.getOfferCode())) {
                OfferCode transferredCode = offerService.lookupOfferCodeByCode(anonymousOffer.getOfferCode());
                OfferInfo info = anonymousCart.getAdditionalOfferInformation().get(anonymousOffer.getOffer());
                OfferInfo offerInfo = offerDao.createOfferInfo();
                for (String key : info.getFieldValues().keySet()) {
                    offerInfo.getFieldValues().put(key, info.getFieldValues().get(key));
                }
                customerCart.getAdditionalOfferInformation().put(transferredCode.getOffer(), offerInfo);
                customerCart.addOfferCode(transferredCode);
            }
        }
View Full Code Here


        order.addOfferCode(offerCode1);
        order.addOfferCode(offerCode2);
        order = orderService.save(order, false);

        OfferInfo info1 = offerDao.createOfferInfo();
        info1.getFieldValues().put("key1", "value1");
        order.getAdditionalOfferInformation().put(offerCode1.getOffer(), info1);
        OfferInfo info2 = offerDao.createOfferInfo();
        info2.getFieldValues().put("key2", "value2");
        order.getAdditionalOfferInformation().put(offerCode2.getOffer(), info2);

        order = orderService.save(order, false);
       
        order = orderService.save(order, true);
View Full Code Here

        OfferCode offerCode2 = createOfferUtility.createOfferCode("30 Dollars Off Item Offer", OfferType.ORDER_ITEM, OfferDiscountType.AMOUNT_OFF, 30, null, null, true, false, 1);

        order.addOfferCode(offerCode1);
        order.addOfferCode(offerCode2);

        OfferInfo info1 = offerDao.createOfferInfo();
        info1.getFieldValues().put("key1", "value1");
        order.getAdditionalOfferInformation().put(offerCode1.getOffer(), info1);
        OfferInfo info2 = offerDao.createOfferInfo();
        info2.getFieldValues().put("key2", "value2");
        order.getAdditionalOfferInformation().put(offerCode2.getOffer(), info2);
       
        order = orderService.save(order, true);

        assert (order.getSubTotal().equals(new Money(240D)));
View Full Code Here

TOP

Related Classes of org.broadleafcommerce.core.offer.domain.OfferInfo

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.