[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Gift Certificates - Multiple Payment Methods
Hello List,
First of all, who has Gift Certificates functioning on their IC store? I
have managed to get the purchasing of Gift Certs working, adding the
certificate to the gift_certs data table and sending the recipient an email.
Where I'm stuck is the point of redeeming the gift certificates.
The logic should work like this:
$Order_Total = subtotal + tax + shipping
foreach $Coupon_Amount(@All_Coupons_Redeemed_By_Customer) {
if ($Coupon_Amount <= $Order_Total) {
$Order_Total -= $Coupon_Amount;
$Coupon_Code is totally used.
} else {
$Order_Total = "0";
$New_Coupon_Amount = $Coupon_Amount - $Order_Total;
Save $New_Coupon_Amount to that coupon, for future redemption.
}
}
if ($Order_Total > 0) {
Require a Credit Card charge for the remaining $Order_Total.
}
Any idea how to allow this to happen? Any idea how to have a Gift
Certificate AND a Credit Card perform a payment, for totals that are greater
than the certificate? How about partial redemption for totals that are less
than the certificate?
Thanks,
Russ