Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email confirmation won't display correct value when applying gift card to order amount

Status
Not open for further replies.

yaknowss

Programmer
Apr 19, 2012
69
0
0
US
I am running into an issue when a user tries to apply a gift card towards a portion of their order. The shopping cart checkout process works fine until they reach the confirmation email. For some reason on the confirmation email the order amount is displaying an inaccurate number and is adding an "(" to the order total (ex. an order of $5.00 is purchased using $3.00 with gift card and $2.00 with credit card; confirmation page displays "($1" instead of $2.00). This process works fine when you apply a gift card towards the full order. I have a feeling the problem is occuring in code lines 1576-1596. Link for file is below.

Code:
dAmtCharged = u.orderTotal();
            //dAmtCharged = dAmtCharged - ec.getPmtPlanTotal();
            if (gc.getGCAppliedAmt() > 0)
            {
                dAmtCharged -= gc.getGCAppliedAmt();
            }
            amtCharged = a.formatString(dAmtCharged.ToString("c"));

            if (isZeroBalCheckout == true)
            {
                if (gc.getGCAppliedAmt() > 0)
                {
                    amtCharged = a.formatString(gc.getGCAppliedAmt().ToString("c"));
                    pmtType = "GIFT CARD #" + gc.getAppliedGiftCardNumbers();
                }
                else
                {
                    amtCharged = "N/A";
                    pmtType = " *** Dinner Reservations don't require credit card ***";
                }
            }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top