CORE POS - IS4C
The CORE POS front end
Public Member Functions | List of all members
COREPOS\pos\lib\Scanning\SpecialUPCs\HouseCoupon Class Reference
Inheritance diagram for COREPOS\pos\lib\Scanning\SpecialUPCs\HouseCoupon:
COREPOS\pos\lib\Scanning\SpecialUPC

Public Member Functions

 isSpecial ($upc)
 
 handle ($upc, $json)
 
 checkQualifications ($id, $quiet=false)
 
 checkLimits ($id)
 
 getValue ($id)
 
- Public Member Functions inherited from COREPOS\pos\lib\Scanning\SpecialUPC
 isSpecial ($upc)
 
 is_special ($upc)
 
 handle ($upc, $json)
 

Additional Inherited Members

- Static Public Member Functions inherited from COREPOS\pos\lib\Scanning\SpecialUPC
static factory ($class)
 

Detailed Description

WFC style custom store coupons

This class looks for UPC prefix 00499999

The remainder of the UPC is an ID value to look up requirement(s) and discount via the houseCoupons and houseCouponItems tables

Member Function Documentation

COREPOS\pos\lib\Scanning\SpecialUPCs\HouseCoupon::checkLimits (   $id)

Check how many times the coupon has been used and compare against usage limits - e.g., one per transaction, one per member, etc. This is a separate method from checkQualifications() so that calling code has the option of working around limits via voids or amount adjustments

Parameters
$id[int] coupon ID
Returns
[boolean] true or [string] error message

For members, enforce limits against longer transaction history

COREPOS\pos\lib\Scanning\SpecialUPCs\HouseCoupon::checkQualifications (   $id,
  $quiet = false 
)

Validate coupon exists, is not expired, and transaction meets required qualifications

Parameters
$id[int] coupon ID
$quiet[boolean] just return false rather than an error message on failure
Returns
[boolean] true or [string] error message
COREPOS\pos\lib\Scanning\SpecialUPCs\HouseCoupon::getValue (   $id)

Get information about how much the coupon is worth

Parameters
$id[int] coupon ID
Returns
array with keys: value => [float] coupon value department => [int] department number for the coupon description => [string] description for coupon

The documentation for this class was generated from the following file: