When I use the nop discount cart with paypal the total after the discount is not passed. The total before the discount is passed. How can I change this?
Thanks
Moderators: Koibito, Stefko, Randy, Rosey
if ( PaymentProcessor == 'pp' ) {
//Process hidden values for PayPal.
strOutput += "<input type=hidden name=\"item_number_" + strFooter + "\" value=\"" + fields[0] + "\">";
strOutput += "<input type=hidden name=\"quantity_" + strFooter + "\" value=\"" + fields[1] + "\">";
strOutput += "<input type=hidden name=\"amount_" + strFooter + "\" value=\"" + (fields[2]*.9) + "\">";
strOutput += "<input type=hidden name=\"item_name_" + strFooter + "\" value=\"" + fields[3] + "\">";
strOutput += "<input type=hidden name=\"shipping_" + strFooter + "\" value=\"" + fields[4] + "\">";
strOutput += "<input type=hidden name=\"on0_" + strFooter + "\" value=\"" + fields[5] + "\">";
if (i == iNumberOrdered) {
strOutput += "<input type=hidden name=\"shipping_" + strFooter + "\" value=\"" + fShipping + "\">";
} if ( PaymentProcessor == 'pp' ) {
//Process hidden values for PayPal.
strOutput += "<input type=hidden name=\"item_number_" + strFooter + "\" value=\"" + fields[0] + "\">";
strOutput += "<input type=hidden name=\"quantity_" + strFooter + "\" value=\"" + fields[1] + "\">";
ppitem = (fields[2] * .9) ;
strOutput += "<input type=hidden name=\"amount_" + strFooter + "\" value=\"" + ppitem + "\">";
strOutput += "<input type=hidden name=\"item_name_" + strFooter + "\" value=\"" + fields[3] + "\">";
strOutput += "<input type=hidden name=\"shipping_" + strFooter + "\" value=\"" + fields[4] + "\">";
strOutput += "<input type=hidden name=\"on0_" + strFooter + "\" value=\"" + fields[5] + "\">";
if (i == iNumberOrdered) {
strOutput += "<input type=hidden name=\"shipping_" + strFooter + "\" value=\"" + fShipping + "\">";
}if ( PaymentProcessor == 'pp' ) {
//Process hidden values for PayPal.
strOutput += "<input type=hidden name=\"item_number_" + strFooter + "\" value=\"" + fields[0] + "\">";
strOutput += "<input type=hidden name=\"quantity_" + strFooter + "\" value=\"" + fields[1] + "\">";
ppitem = (fields[2] * .9) ;
strOutput += "<input type=hidden name=\"amount_" + strFooter + "\" value=\"" + moneyFormat(ppitem) + "\">";
strOutput += "<input type=hidden name=\"item_name_" + strFooter + "\" value=\"" + fields[3] + "\">";
strOutput += "<input type=hidden name=\"shipping_" + strFooter + "\" value=\"" + fields[4] + "\">";
strOutput += "<input type=hidden name=\"on0_" + strFooter + "\" value=\"" + fields[5] + "\">";
if (i == iNumberOrdered) {
strOutput += "<input type=hidden name=\"shipping_" + strFooter + "\" value=\"" + fShipping + "\">";
}CODE REMOVED - Code not the problem //---------ADDED-----------||
if ( bDisplay ) {
if ( fDiscount > 0 ) {
strOutput += "<TR><TD CLASS=\"noptotal\" COLSPAN=4><B>"+ OutputOrderPresub +"</B></TD>";
strOutput += "<TD CLASS=\"noptotal\" COLSPAN=2 ALIGN=RIGHT><B>"+ MonetarySymbol + strPresub + "</B></TD></TR>";
strOutput += "<TR><TD CLASS=\"noptotal\" COLSPAN=4><B>"+ DiscountRate +"%" + strSpace + strDIS +"</B></TD>";
strOutput += "<TD CLASS=\"noptotal\" COLSPAN=2 ALIGN=RIGHT><FONT COLOR=RED><B>"+ strMINUS + MonetarySymbol + strDiscount + "</FONT></B></TD>";
strOutput += "</TR>";
}
}
//---------STOP ADDED-----------||Users browsing this forum: No registered users and 1 guest