Skip to content

Latest commit

 

History

History
169 lines (103 loc) · 5.6 KB

File metadata and controls

169 lines (103 loc) · 5.6 KB

outdated

Interfaces

Danger

We're sorry but this documentation section is outdated. Please have that in mind when trying to use it. You can help us making documentation up to date via Sylius Github. Thank you!

Model Interfaces

PromotionSubjectInterface

To characterize an object with attributes and options from a promotion, the object class needs to implement the PromotionSubjectInterface.

PromotionInterface

This interface should be implemented by models representing a Promotion.

Note

This interface extends the CodeAwareInterface and TimestampableInterface.

PromotionActionInterface

This interface should be implemented by models representing an PromotionAction.

An PromotionActionInterface has two defined types by default:

Related constant Type
TYPE_FIXED_DISCOUNT fixed_discount
TYPE_PERCENTAGE_DISCOUNT percentage_discount

CouponInterface

This interface should be implemented by models representing a Coupon.

Note

This interface extends the CodeAwareInterface and the TimestampableInterface.

PromotionRuleInterface

This interface should be implemented by models representing a PromotionRule.

A PromotionRuleInterface has two defined types by default:

Related constant Type
TYPE_ITEM_TOTAL item_total
TYPE_ITEM_COUNT item_count

CountablePromotionSubjectInterface

To be able to count the object's promotion subjects, the object class needs to implement the CountablePromotionSubjectInterface.

Note

This interface extends the component_promotion_model_promotion-subject-interface.

PromotionCouponAwarePromotionSubjectInterface

To make the object able to get its associated coupon, the object class needs to implement the PromotionCouponAwarePromotionSubjectInterface.

Note

This interface extends the component_promotion_model_promotion-subject-interface.

PromotionCouponsAwareSubjectInterface

To make the object able to get its associated coupons collection, the object class needs to implement the PromotionCouponsAwareSubjectInterface.

Note

This interface extends the component_promotion_model_promotion-subject-interface.

Services Interfaces

PromotionEligibilityCheckerInterface

Services responsible for checking the promotions eligibility on the promotion subjects should implement this interface.

RuleCheckerInterface

Services responsible for checking the rules eligibility should implement this interface.

PromotionApplicatorInterface

Service responsible for applying promotions in your system should implement this interface.

PromotionProcessorInterface

Service responsible for checking all rules and applying configured actions if rules are eligible in your system should implement this interface.

PromotionRepositoryInterface

In order to be able to find active promotions in your system you should create a repository class which implements this interface.

Note

This interface extends the RepositoryInterface.

PromotionCouponGeneratorInterface

In order to automate the process of coupon generation your system needs to have a service that will implement this interface.

PromotionActionCommandInterface

This interface should be implemented by services that execute actions on the promotion subjects.