getData();
if ($data['giftCardCode']) {
$giftCardObj = new App_ECommerce_GiftCard_Admin_Obj();
$codeData = $giftCardObj->getDataByCode($data['giftCardCode']);
if (!empty($codeData)) {
$text .= 'Gift Card has been accepted. ';
$text .= '$' . number_format($data['giftCardValue'], 2, '.', ',') . ' OFF!';
$text = ' ' . $text . '';
} else {
$text .= 'The Gift Card cannot be applied. Gift Card is not valid.';
}
}
return $text;
}
protected function _getGiftCardDiscount(array $cart, $subtotal)
{
$giftCardObj = new App_ECommerce_GiftCard_Admin_Obj();
$cardData = $giftCardObj->getDataByCode($cart['giftCardCode']);
if (!empty($cardData)) {
$result = $cart['giftCardValue'];
if (-1 != Zend_Locale_Math::Comp($result, $subtotal, 2)) {
$result = Zend_Locale_Math::Sub($subtotal, App_ECommerce_Cart_Obj::MIN_SUBTOTAL_VAL, 2);
}
} else {
$result = 0;
}
return $result;
}
}