Definition at line 9 of file oxvoucher.php.
| Public Member Functions | |
| __construct () | |
| getVoucherByNr ($voucherNr, $aVouchers=array(), $blCheckavalability=false) | |
| markAsUsed ($sOrderId, $sUserId) | |
| markAsReserved () | |
| unMarkAsReserved () | |
| getDiscountValue ($dPrice) | |
| checkVoucherAvailability ($aVouchers, $dPrice) | |
| checkBasketVoucherAvailability ($aVouchers, $dPrice) | |
| checkUserAvailability ($oUser) | |
| getSimpleVoucher () | |
| getSerie () | |
| Protected Member Functions | |
| _isAvailablePrice ($dPrice) | |
| _isAvailableWithSameSeries ($aVouchers) | |
| _isAvailableWithOtherSeries ($aVouchers) | |
| _isValidDate () | |
| _isNotReserved () | |
| _isAvailableInOtherOrder ($oUser) | |
| _isValidUserGroup ($oUser) | |
| Protected Attributes | |
| $_oSerie = null | |
| $_blDisableShopCheck = true | |
| $_sClassName = 'oxvoucher' | |
| oxVoucher.__construct | ( | ) | 
Class constructor, initiates parent constructor (parent.oxBase()).
Reimplemented from oxBase.
Definition at line 29 of file oxvoucher.php.
| oxVoucher.getVoucherByNr | ( | $ | voucherNr, | |
| $ | aVouchers = array(), | |||
| $ | blCheckavalability = false | |||
| ) | 
Gets voucher from db by given number.
| string | $voucherNr Voucher number | |
| array | $aVouchers Array of available vouchers (default array()) | |
| bool | $blCheckavalability () | 
| oxVoucherException | exception | 
Definition at line 46 of file oxvoucher.php.
| oxVoucher.markAsUsed | ( | $ | sOrderId, | |
| $ | sUserId | |||
| ) | 
marks voucher as used
| string | $sOrderId order id | |
| string | $sUserId user id | 
Definition at line 86 of file oxvoucher.php.
| oxVoucher.markAsReserved | ( | ) | 
| oxVoucher.unMarkAsReserved | ( | ) | 
| oxVoucher.getDiscountValue | ( | $ | dPrice | ) | 
Returns the discount value used.
| double | $dPrice price to calculate discount on it | 
| oxVoucherException | exception | 
Definition at line 138 of file oxvoucher.php.
| oxVoucher.checkVoucherAvailability | ( | $ | aVouchers, | |
| $ | dPrice | |||
| ) | 
Checks availability without user logged in. Returns array with errors.
| array | $aVouchers array of vouchers | |
| double | $dPrice current sum (price) | 
| oxVoucherException | exception | 
Definition at line 169 of file oxvoucher.php.
| oxVoucher.checkBasketVoucherAvailability | ( | $ | aVouchers, | |
| $ | dPrice | |||
| ) | 
Performs basket level voucher availability check (no need to check if voucher is reserved or so).
| array | $aVouchers array of vouchers | |
| double | $dPrice current sum (price) | 
| oxVoucherException | exception | 
Definition at line 193 of file oxvoucher.php.
| oxVoucher._isAvailablePrice | ( | $ | dPrice | ) |  [protected] | 
Checks availability about price. Returns error array.
| double | $dPrice base article price | 
| oxVoucherException | exception | 
Definition at line 214 of file oxvoucher.php.
| oxVoucher._isAvailableWithSameSeries | ( | $ | aVouchers | ) |  [protected] | 
Checks if cumulation with vouchers of the same series possible. Returns true on success.
| array | $aVouchers array of vouchers | 
| oxVoucherException | exception | 
Definition at line 245 of file oxvoucher.php.
| oxVoucher._isAvailableWithOtherSeries | ( | $ | aVouchers | ) |  [protected] | 
Checks if cumulation with vouchers from the other series possible. Returns true on success.
| array | $aVouchers array of vouchers | 
| oxVoucherException | exception | 
Definition at line 279 of file oxvoucher.php.
| oxVoucher._isValidDate | ( | ) |  [protected] | 
Checks if voucher is in valid time period. Returns true on success.
| oxVoucherException | exception | 
Definition at line 315 of file oxvoucher.php.
| oxVoucher._isNotReserved | ( | ) |  [protected] | 
Checks if voucher is not yet reserved before.
| oxVoucherException | exception | 
Definition at line 344 of file oxvoucher.php.
| oxVoucher.checkUserAvailability | ( | $ | oUser | ) | 
Checks availability for the given user. Returns array with errors.
| object | $oUser user object | 
| oxVoucherException | exception | 
Definition at line 366 of file oxvoucher.php.
| oxVoucher._isAvailableInOtherOrder | ( | $ | oUser | ) |  [protected] | 
Checks if user already used vouchers from this series and can he use it again.
| object | $oUser user object | 
| oxVoucherException | exception | 
Definition at line 385 of file oxvoucher.php.
| oxVoucher._isValidUserGroup | ( | $ | oUser | ) |  [protected] | 
Checks if user belongs to the same group as the voucher. Returns true on sucess.
| object | $oUser user object | 
| oxVoucherException | exception | 
Definition at line 414 of file oxvoucher.php.
| oxVoucher.getSimpleVoucher | ( | ) | 
Returns compact voucher object which is used in oxbasket
Definition at line 443 of file oxvoucher.php.
| oxVoucher.getSerie | ( | ) | 
create oxVoucherSerie object of this voucher
Definition at line 458 of file oxvoucher.php.
| oxVoucher.$_oSerie = null  [protected] | 
Definition at line 12 of file oxvoucher.php.
| oxVoucher.$_blDisableShopCheck = true  [protected] | 
Definition at line 19 of file oxvoucher.php.
| oxVoucher.$_sClassName = 'oxvoucher'  [protected] | 
 1.5.5
 1.5.5