Back to PhocacartCart class

Method getCoupon

public
getCoupon
()

Method getCoupon - Source code

public function getCoupon()
{
    $coupon = array();
    $coupon['title'] = $this->coupon['title'];
    $coupon['id'] = $this->coupon['id'];
    // E.g. guest checkout
    if (isset($coupon['id']) && (int) $coupon['id'] > 0 && $coupon['title'] == '') {
        $cI = PhocacartCoupon::getCouponTitleById((int) $coupon['id']);
        if (isset($cI->title)) {
            $coupon['title'] = $cI->title;
        }
    }
    return $coupon;
}