VirtueMart  3.2.14.9808
Static Public Member Functions | List of all members
CouponHelper Class Reference

Static Public Member Functions

static ValidateCouponCode ($_code, $_billTotal)
 
static getCouponDetails ($_code)
 
static RemoveCoupon ($_code, $_force=false)
 
static setInUseCoupon ($code, $in_use=true, $coupon_used=null)
 

Member Function Documentation

static CouponHelper::getCouponDetails (   $_code)
static

Get the details for a given coupon

Parameters
string$_codeCoupon code
Author
Oscar van Eijk
Returns
object Coupon details
static CouponHelper::RemoveCoupon (   $_code,
  $_force = false 
)
static

Remove a coupon from the database

Parameters
$_codeCoupon code
$_forceTrue if the remove is forced. By default, only gift coupons are removed
Author
Oscar van Eijk
Returns
boolean True on success
static CouponHelper::setInUseCoupon (   $code,
  $in_use = true,
  $coupon_used = null 
)
static

Remove a coupon from the database

Parameters
$_codeCoupon code
$_forceTrue if the remove is forced. By default, only gift coupons are removed
Author
Valérie Isaksen
Returns
boolean True on success
static CouponHelper::ValidateCouponCode (   $_code,
  $_billTotal 
)
static

Check if the given coupon code exists, is (still) valid and valid for the total order amount

Parameters
string$_codeCoupon code
float$_billTotalTotal amount for the order
Author
Oscar van Eijk
Max Milbers
Returns
string Empty when the code is valid, otherwise the error message

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