Method | Description | |
---|---|---|
__construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Component\Core\Factory\PromotionActionFactoryInterface $actionFactory, Sylius\Component\Promotion\Factory\PromotionCouponFactoryInterface $couponFactory, Sylius\Component\Core\Factory\PromotionRuleFactoryInterface $ruleFactory, Sylius\Component\Core\Test\Factory\TestPromotionFactoryInterface $testPromotionFactory, Sylius\Component\Promotion\Repository\PromotionRepositoryInterface $promotionRepository, Doctrine\Common\Persistence\ObjectManager $objectManager ) | ||
itGivesFixedDiscountOffOnAProduct ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\ProductInterface $product ) | ||
itGivesFixedDiscountToEveryOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount ) | ||
itGivesFixedDiscountToEveryOrderWithItemsTotalAtLeast ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $targetAmount ) | ||
itGivesFixedDiscountToEveryOrderWithQuantityAtLeast ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $quantity ) | ||
itGivesFixedOffCustomersNthOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $nth ) | ||
itGivesFixedOffEveryProductClassifiedAs ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\TaxonInterface $taxon ) | ||
itGivesOffOnEveryItemWhenItemTotalExceeds ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $targetAmount ) | ||
itGivesOffOnEveryProductClassifiedAsAndAFixedDiscountToEveryOrderWithItemsTotalEqualAtLeast ( Sylius\Component\Core\Model\PromotionInterface $promotion, $taxonDiscount, Sylius\Component\Core\Model\TaxonInterface $taxon, $orderDiscount, $targetAmount ) | ||
itGivesOffOnEveryProductClassifiedAsAndAFreeShippingToEveryOrderWithItemsTotalEqualAtLeast ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\TaxonInterface $taxon, $targetAmount ) | ||
itGivesOffOnEveryProductClassifiedAsIfOrderContainsAnyProductClassifiedAs ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $discountTaxon, $targetTaxon ) | ||
itGivesOffOnEveryProductClassifiedAsOrIfOrderContainsAnyProductClassifiedAsOr ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, array $discountTaxons, array $targetTaxons ) | ||
itGivesPercentageDiscountOffOnAProduct ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\ProductInterface $product ) | ||
itGivesPercentageDiscountOnShippingToEveryOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount ) | ||
itGivesPercentageDiscountToEveryOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount ) | ||
itGivesPercentageOffCustomersNthOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $nth ) | ||
itGivesPercentageOffEveryProductClassifiedAs ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\TaxonInterface $taxon ) | ||
itGivesPercentageOffOnEveryProductClassifiedAsAndAmountDiscountOnOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion, $productDiscount, Sylius\Component\Core\Model\TaxonInterface $discountTaxon, $orderDiscount ) | ||
itIsCouponBasedPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion ) | ||
theCouponWasUsed ( Sylius\Component\Core\Model\PromotionCouponInterface $coupon ) | ||
thePromotionGivesFreeShippingToEveryOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion ) | ||
thePromotionGivesOffIfOrderContainsProducts ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\ProductInterface $product ) | ||
thePromotionGivesOffIfOrderContainsProductsClassifiedAs ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\TaxonInterface $taxon ) | ||
thePromotionGivesOffIfOrderContainsProductsClassifiedAsAndPricedAt ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\TaxonInterface $taxon, $amount ) | ||
thePromotionGivesOffIfOrderContainsProductsClassifiedAsOr ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, array $taxons ) | ||
thePromotionWasDisabledForTheChannel ( Sylius\Component\Core\Model\PromotionInterface $promotion, Sylius\Component\Core\Model\ChannelInterface $channel ) | ||
thereIsAPromotionWithPriority ( $promotionName, $priority ) | ||
thereIsAnExclusivePromotionWithPriority ( $promotionName, $priority ) | ||
thereIsPromotion ( $promotionName, $promotionCode = null ) | ||
thereIsPromotionLimitedToUsages ( $promotionName, $usageLimit ) | ||
thereIsPromotionWithCoupon ( $promotionName, $couponCode, $usageLimit = null ) | ||
thisCouponCanBeUsedNTimes ( Sylius\Component\Core\Model\PromotionCouponInterface $coupon, $usageLimit ) | ||
thisCouponCanBeUsedTwicePerCustomer ( Sylius\Component\Core\Model\PromotionCouponInterface $coupon ) | ||
thisCouponExpiresTomorrow ( Sylius\Component\Core\Model\PromotionCouponInterface $coupon ) | ||
thisCouponHasExpired ( Sylius\Component\Core\Model\PromotionCouponInterface $coupon ) | ||
thisCouponHasReachedItsUsageLimit ( Sylius\Component\Core\Model\PromotionCouponInterface $coupon ) | ||
thisPromotionGivesDiscountToEveryOrderInTheChannelAndDiscountToEveryOrderInTheChannel ( Sylius\Component\Core\Model\PromotionInterface $promotion, $firstChannelDiscount, Sylius\Component\Core\Model\ChannelInterface $firstChannel, $secondChannelDiscount, Sylius\Component\Core\Model\ChannelInterface $secondChannel ) | ||
thisPromotionGivesInDifferentCurrenciesOffOnEveryProductWithMinimumPriceAt ( Sylius\Component\Core\Model\PromotionInterface $promotion, $baseDiscount, $currencyDiscount, $currencyCode, $minimumPrice ) | ||
thisPromotionGivesOffOnEveryProductPricedBetween ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $minAmount, $maxAmount ) | ||
thisPromotionGivesOffOnEveryProductWithMinimumPriceAt ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $amount ) | ||
thisPromotionHasExpired ( Sylius\Component\Core\Model\PromotionInterface $promotion ) | ||
thisPromotionPercentageGivesOffOnEveryProductPricedBetween ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $minAmount, $maxAmount ) | ||
thisPromotionPercentageGivesOffOnEveryProductWithMinimumPriceAt ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $amount ) |
Method | Description | |
---|---|---|
createFixedPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion, integer $discount, array $configuration = [], Sylius\Component\Promotion\Model\PromotionRuleInterface $rule = null, Sylius\Component\Core\Model\ChannelInterface $channel = null ) | ||
createPercentagePromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion, float $discount, array $configuration = [], Sylius\Component\Promotion\Model\PromotionRuleInterface $rule = null ) | ||
createUnitFixedPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion, integer $discount, array $configuration = [], Sylius\Component\Promotion\Model\PromotionRuleInterface $rule = null ) | ||
createUnitPercentagePromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion, integer $discount, array $configuration = [], Sylius\Component\Promotion\Model\PromotionRuleInterface $rule = null ) | ||
getPriceRangeFilterConfiguration ( integer $minAmount, integer $maxAmount = null ) : array | ||
getProductsFilterConfiguration ( array $productCodes ) : array | ||
getTaxonFilterConfiguration ( array $taxonCodes ) : array | ||
persistPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion, Sylius\Component\Promotion\Model\PromotionActionInterface $action, array $configuration, Sylius\Component\Promotion\Model\PromotionRuleInterface $rule = null ) |
public __construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Component\Core\Factory\PromotionActionFactoryInterface $actionFactory, Sylius\Component\Promotion\Factory\PromotionCouponFactoryInterface $couponFactory, Sylius\Component\Core\Factory\PromotionRuleFactoryInterface $ruleFactory, Sylius\Component\Core\Test\Factory\TestPromotionFactoryInterface $testPromotionFactory, Sylius\Component\Promotion\Repository\PromotionRepositoryInterface $promotionRepository, Doctrine\Common\Persistence\ObjectManager $objectManager ) | ||
$sharedStorage | Sylius\Behat\Service\SharedStorageInterface | |
$actionFactory | Sylius\Component\Core\Factory\PromotionActionFactoryInterface | |
$couponFactory | Sylius\Component\Promotion\Factory\PromotionCouponFactoryInterface | |
$ruleFactory | Sylius\Component\Core\Factory\PromotionRuleFactoryInterface | |
$testPromotionFactory | Sylius\Component\Core\Test\Factory\TestPromotionFactoryInterface | |
$promotionRepository | Sylius\Component\Promotion\Repository\PromotionRepositoryInterface | |
$objectManager | Doctrine\Common\Persistence\ObjectManager |
public itGivesFixedDiscountOffOnAProduct ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\ProductInterface $product ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$product | Sylius\Component\Core\Model\ProductInterface |
public itGivesFixedDiscountToEveryOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public itGivesFixedDiscountToEveryOrderWithItemsTotalAtLeast ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $targetAmount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public itGivesFixedDiscountToEveryOrderWithQuantityAtLeast ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $quantity ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public itGivesFixedOffCustomersNthOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $nth ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public itGivesFixedOffEveryProductClassifiedAs ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\TaxonInterface $taxon ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$taxon | Sylius\Component\Core\Model\TaxonInterface |
public itGivesOffOnEveryItemWhenItemTotalExceeds ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $targetAmount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public itGivesOffOnEveryProductClassifiedAsAndAFixedDiscountToEveryOrderWithItemsTotalEqualAtLeast ( Sylius\Component\Core\Model\PromotionInterface $promotion, $taxonDiscount, Sylius\Component\Core\Model\TaxonInterface $taxon, $orderDiscount, $targetAmount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$taxon | Sylius\Component\Core\Model\TaxonInterface |
public itGivesOffOnEveryProductClassifiedAsAndAFreeShippingToEveryOrderWithItemsTotalEqualAtLeast ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\TaxonInterface $taxon, $targetAmount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$taxon | Sylius\Component\Core\Model\TaxonInterface |
public itGivesOffOnEveryProductClassifiedAsIfOrderContainsAnyProductClassifiedAs ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $discountTaxon, $targetTaxon ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public itGivesOffOnEveryProductClassifiedAsOrIfOrderContainsAnyProductClassifiedAsOr ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, array $discountTaxons, array $targetTaxons ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$discountTaxons | array | |
$targetTaxons | array |
public itGivesPercentageDiscountOffOnAProduct ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\ProductInterface $product ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$product | Sylius\Component\Core\Model\ProductInterface |
public itGivesPercentageDiscountOnShippingToEveryOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public itGivesPercentageDiscountToEveryOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public itGivesPercentageOffCustomersNthOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $nth ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public itGivesPercentageOffEveryProductClassifiedAs ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\TaxonInterface $taxon ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$taxon | Sylius\Component\Core\Model\TaxonInterface |
public itGivesPercentageOffOnEveryProductClassifiedAsAndAmountDiscountOnOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion, $productDiscount, Sylius\Component\Core\Model\TaxonInterface $discountTaxon, $orderDiscount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$discountTaxon | Sylius\Component\Core\Model\TaxonInterface |
public itIsCouponBasedPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public theCouponWasUsed ( Sylius\Component\Core\Model\PromotionCouponInterface $coupon ) | ||
$coupon | Sylius\Component\Core\Model\PromotionCouponInterface |
public thePromotionGivesFreeShippingToEveryOrder ( Sylius\Component\Core\Model\PromotionInterface $promotion ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public thePromotionGivesOffIfOrderContainsProducts ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\ProductInterface $product ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$product | Sylius\Component\Core\Model\ProductInterface |
public thePromotionGivesOffIfOrderContainsProductsClassifiedAs ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\TaxonInterface $taxon ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$taxon | Sylius\Component\Core\Model\TaxonInterface |
public thePromotionGivesOffIfOrderContainsProductsClassifiedAsAndPricedAt ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, Sylius\Component\Core\Model\TaxonInterface $taxon, $amount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$taxon | Sylius\Component\Core\Model\TaxonInterface |
public thePromotionGivesOffIfOrderContainsProductsClassifiedAsOr ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, array $taxons ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$taxons | array |
public thePromotionWasDisabledForTheChannel ( Sylius\Component\Core\Model\PromotionInterface $promotion, Sylius\Component\Core\Model\ChannelInterface $channel ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$channel | Sylius\Component\Core\Model\ChannelInterface |
public thereIsAPromotionWithPriority ( $promotionName, $priority ) |
public thereIsAnExclusivePromotionWithPriority ( $promotionName, $priority ) |
public thereIsPromotionLimitedToUsages ( $promotionName, $usageLimit ) |
public thereIsPromotionWithCoupon ( $promotionName, $couponCode, $usageLimit = null ) |
public thisCouponCanBeUsedNTimes ( Sylius\Component\Core\Model\PromotionCouponInterface $coupon, $usageLimit ) | ||
$coupon | Sylius\Component\Core\Model\PromotionCouponInterface |
public thisCouponCanBeUsedTwicePerCustomer ( Sylius\Component\Core\Model\PromotionCouponInterface $coupon ) | ||
$coupon | Sylius\Component\Core\Model\PromotionCouponInterface |
public thisCouponExpiresTomorrow ( Sylius\Component\Core\Model\PromotionCouponInterface $coupon ) | ||
$coupon | Sylius\Component\Core\Model\PromotionCouponInterface |
public thisCouponHasExpired ( Sylius\Component\Core\Model\PromotionCouponInterface $coupon ) | ||
$coupon | Sylius\Component\Core\Model\PromotionCouponInterface |
public thisCouponHasReachedItsUsageLimit ( Sylius\Component\Core\Model\PromotionCouponInterface $coupon ) | ||
$coupon | Sylius\Component\Core\Model\PromotionCouponInterface |
public thisPromotionGivesDiscountToEveryOrderInTheChannelAndDiscountToEveryOrderInTheChannel ( Sylius\Component\Core\Model\PromotionInterface $promotion, $firstChannelDiscount, Sylius\Component\Core\Model\ChannelInterface $firstChannel, $secondChannelDiscount, Sylius\Component\Core\Model\ChannelInterface $secondChannel ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface | |
$firstChannel | Sylius\Component\Core\Model\ChannelInterface | |
$secondChannel | Sylius\Component\Core\Model\ChannelInterface |
public thisPromotionGivesInDifferentCurrenciesOffOnEveryProductWithMinimumPriceAt ( Sylius\Component\Core\Model\PromotionInterface $promotion, $baseDiscount, $currencyDiscount, $currencyCode, $minimumPrice ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public thisPromotionGivesOffOnEveryProductPricedBetween ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $minAmount, $maxAmount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public thisPromotionGivesOffOnEveryProductWithMinimumPriceAt ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $amount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public thisPromotionHasExpired ( Sylius\Component\Core\Model\PromotionInterface $promotion ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public thisPromotionPercentageGivesOffOnEveryProductPricedBetween ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $minAmount, $maxAmount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |
public thisPromotionPercentageGivesOffOnEveryProductWithMinimumPriceAt ( Sylius\Component\Core\Model\PromotionInterface $promotion, $discount, $amount ) | ||
$promotion | Sylius\Component\Core\Model\PromotionInterface |