Package org.broadleafcommerce.core.offer.domain

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


        assertTrue(adjustmentCount == 0);
        //assertTrue(order.getSubTotal().equals(new Money(124.95D)));

        order = dataProvider.createBasicOrder();
        myOrder.set(order);
        OfferRule orderRule = new OfferRuleImpl();
        //orderRule.setMatchRule("order.subTotal.getAmount()>124");
        orderRule.setMatchRule("order.subTotal.getAmount()>100");
        offers.get(0).getOfferMatchRules().put(OfferRuleType.ORDER.getType(), orderRule);

        offerService.applyAndSaveOffersToOrder(offers, order);

        //now that the order restriction has been lessened, even with the item level discounts applied,
View Full Code Here


        boolean totalitarianOffer,
        OfferType offerType,
        BigDecimal value
    ) {
        Offer offer = new OfferImpl();
        OfferRule customerRule = new OfferRuleImpl();
        customerRule.setMatchRule(appliesToCustomerRules);
        offer.getOfferMatchRules().put(OfferRuleType.CUSTOMER.getType(), customerRule);
        OfferRule fgRule = new OfferRuleImpl();
        fgRule.setMatchRule(appliesToFulfillmentGroupRules);
        offer.getOfferMatchRules().put(OfferRuleType.FULFILLMENT_GROUP.getType(), fgRule);
        OfferRule orderRule = new OfferRuleImpl();
        orderRule.setMatchRule(appliesToRules);
        offer.getOfferMatchRules().put(OfferRuleType.ORDER.getType(), orderRule);
        offer.setApplyDiscountToSalePrice(applyToSalePrice);
        offer.setCombinableWithOtherOffers(combinableWithOtherOffers);
        offer.setDeliveryType(deliveryType);
        offer.setAutomaticallyAdded(OfferDeliveryType.AUTOMATIC==deliveryType);
View Full Code Here

TOP

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

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.