CORE POS - IS4C
The CORE POS front end
|
Public Member Functions | |
isSpecial ($upc) | |
handle ($upc, $json) | |
checkQualifications ($id, $quiet=false) | |
checkLimits ($id) | |
getValue ($id) | |
Public Member Functions inherited from SpecialUPC | |
isSpecial ($upc) | |
is_special ($upc) | |
handle ($upc, $json) | |
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
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
$id | [int] coupon ID |
For members, enforce limits against longer transaction history
HouseCoupon::checkQualifications | ( | $id, | |
$quiet = false |
|||
) |
Validate coupon exists, is not expired, and transaction meets required qualifications
$id | [int] coupon ID |
$quiet | [boolean] just return false rather than an error message on failure |
HouseCoupon::getValue | ( | $id) |
Get information about how much the coupon is worth
$id | [int] coupon ID |
This is a little messy to cram two different values into one number. The decimal portion is the discount percentage; the integer portion is the maximum discountable total. The latter is the discount cap expressed in a way that will be an integer more often.
Example: A 5 percent discount capped at $2.50 => 50.05