Customizing Subscription Intervals

The B2Bsellers Suite allows you to extend or modify the available subscription intervals to meet specific business requirements. This is a two-step process: adding the interval to the collection and providing a processor to calculate future delivery dates.

Adding or Removing Intervals

To modify the list of available intervals, create an event subscriber that listens to the DeliveryIntervalCollectorEvent.

Inside the subscriber, you can use the getCollection() method to remove existing intervals (like weekly) or add new ones using the DeliveryIntervalStruct.

Example

Implementing the Interval Processor

For every custom interval added, you must provide a corresponding processor to calculate the next delivery or order date.

The processor must implement the IntervalProcessorInterface and be registered in the service container with a specific the b2b_product_subscription.interval.processor tag.

Example

Last updated

Was this helpful?