Documentation

PromotionSubscriber
in package

Table of Contents

getAvailablePromotion()  : Promotion|null
This function will retrieve the promotion given the promo code, the user and an optional billable entity.
subscribeToPromotion()  : PromotionsCustomer|false
This function will subscribe the user to the promotion, if the promotion is available for the user.

Methods

getAvailablePromotion()

This function will retrieve the promotion given the promo code, the user and an optional billable entity.

public static getAvailablePromotion(string $promoCode, AuthUser $user[, PriceList|null $priceList = null ]) : Promotion|null

It will return false if the promotion is not available for the user.

Parameters
$promoCode : string
$user : AuthUser
$priceList : PriceList|null = null
Return values
Promotion|null

Search results