Checkout With Gift Certificate

Hi Guys

I’m trying to get gift certificates to be checked out by them self’s, and if there’s any product with them for it to come up with a message saying so. This is what I have so far but it’s not working. Can any one help me.
if ($mode == 'checkout') {

foreach ($_SESSION[‘cart’][‘products’] as $key => $value) {

    if ($cart['gift_certificates']['products']) {
        if (count($_SESSION['cart']['products']) > 1) {
        	$single_gift_voucher[] = $value['product'];
        }
    }	    
}

if (!empty($single_gift_voucher)) {
	foreach ($single_gift_voucher as $value) {
          fn_set_notification('W', __('notice'), '<i>'.$value.' </i>'.__('og_item_single_check_out_only').' '.'<i> '.$value.'</i>');
	}
	return array(CONTROLLER_STATUS_REDIRECT, "checkout.cart");
}

}