Package org.broadleafcommerce.core.offer.domain

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


        offer.setDiscountType(discountType);
        offer.setValue(BigDecimal.valueOf(value));
        offer.setDeliveryType(OfferDeliveryType.CODE);
        offer.setStackable(true);

        OfferItemCriteria oic = new OfferItemCriteriaImpl();
        oic.setQuantity(1);
        oic.setMatchRule(orderRule);
        offer.setTargetItemCriteria(Collections.singleton(oic));

        offer.setAppliesToCustomerRules(customerRule);
        offer.setCombinableWithOtherOffers(true);
        offer = offerService.save(offer);
View Full Code Here


        List<Offer> offers = createOrderBasedOffer(orderRule, discountType);
        offers.get(0).setType(OfferType.ORDER_ITEM);
       
        if (targetRule != null) {
            Set<OfferItemCriteria> targetSet = new HashSet<OfferItemCriteria>();
            OfferItemCriteria targetCriteria = new OfferItemCriteriaImpl();
            //targetCriteria.setQualifyingOffer(offers.get(0));
            targetCriteria.setQuantity(1);
            targetCriteria.setMatchRule(targetRule);
            targetSet.add(targetCriteria);
           
            offers.get(0).setTargetItemCriteria(targetSet);
        }
       
View Full Code Here

    }
   
    public List<Offer> createOrderBasedOfferWithItemCriteria(String orderRule, OfferDiscountType discountType, String orderItemMatchRule) {
        List<Offer> offers = createOrderBasedOffer(orderRule, discountType);
       
        OfferItemCriteria qualCriteria = new OfferItemCriteriaImpl();
        //qualCriteria.setQualifyingOffer(offers.get(0));
        qualCriteria.setQuantity(1);
        qualCriteria.setMatchRule(orderItemMatchRule);
        Set<OfferItemCriteria> criterias = new HashSet<OfferItemCriteria>();
        criterias.add(qualCriteria);
       
        offers.get(0).setQualifyingItemCriteria(criterias);
       
View Full Code Here

    }
   
    public List<Offer> createFGBasedOfferWithItemCriteria(String orderRule, String fgRule, OfferDiscountType discountType, String orderItemMatchRule) {
        List<Offer> offers = createFGBasedOffer(orderRule, fgRule, discountType);
       
        OfferItemCriteria qualCriteria = new OfferItemCriteriaImpl();
        //qualCriteria.setQualifyingOffer(offers.get(0));
        qualCriteria.setQuantity(1);
        qualCriteria.setMatchRule(orderItemMatchRule);
        Set<OfferItemCriteria> criterias = new HashSet<OfferItemCriteria>();
        criterias.add(qualCriteria);
       
        offers.get(0).setQualifyingItemCriteria(criterias);
       
View Full Code Here

   
    public List<Offer> createItemBasedOfferWithItemCriteria(String orderRule, OfferDiscountType discountType, String qualRule, String targetRule) {
        List<Offer> offers = createItemBasedOffer(orderRule, targetRule, discountType);
       
        if (qualRule != null) {
            OfferItemCriteria qualCriteria = new OfferItemCriteriaImpl();
            //qualCriteria.setQualifyingOffer(offers.get(0));
            qualCriteria.setQuantity(1);
            qualCriteria.setMatchRule(qualRule);
            Set<OfferItemCriteria> criterias = new HashSet<OfferItemCriteria>();
            criterias.add(qualCriteria);
           
            offers.get(0).setQualifyingItemCriteria(criterias);
        }
View Full Code Here

        if (stackable) {
            offer.setOfferItemQualifierRuleType(OfferItemRestrictionRuleType.QUALIFIER_TARGET);
            offer.setOfferItemTargetRuleType(OfferItemRestrictionRuleType.QUALIFIER_TARGET);
        }
       
        OfferItemCriteria oic = new OfferItemCriteriaImpl();
        oic.setQuantity(1);
        oic.setMatchRule(orderRule);
        offer.setTargetItemCriteria(Collections.singleton(oic));
       
        offer.setAppliesToCustomerRules(customerRule);
        offer.setCombinableWithOtherOffers(combinable);
        offer.setPriority(priority);
View Full Code Here

TOP

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

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.