<b><?php echo fc_text('setupfees'); ?> </b><br /> </td><td class="showcartcell" colspan="1" align="right" valign="top" bgcolor="#FFFFFF"> <?php printf("%s%.2f<br />", $csym, $prodsettot); // accumulate setup into order total $ttotal = rnd($prodsettot + $ttotal); ?> </td></tr> <?php } if ($zflag1 & $flag_zonecoupon) { // $stotal is the discounted product subtotal $cpndisc = coupon_discount($couponid, $stotal, $tqty); if ($cpndisc > 0) { $shipsubtotal = rnd($shipsubtotal - $cpndisc); $taxsubtotal = rnd($taxsubtotal - $cpndisc); $stotal = rnd($stotal - $cpndisc); $ototal = rnd($ototal - $cpndisc); $ttotal = rnd($ttotal - $cpndisc); ?> <tr><td class="showcartcell" colspan="1" bgcolor="#FFFFFF"></td> <td class="showcartcell" colspan="2" align="left" valign="top" bgcolor="#FFFFFF"> <b><?php echo fc_text('coupondisc'); ?> </b><br /> </td><td class="showcartcell" colspan="1" align="right" valign="top" bgcolor="#FFFFFF"> <?php
$ototal = rnd($ltotal + $ototal); $ttotal = rnd($ltotal + $ttotal); $wtotal = rnd($wtotal + $lweight); } $i++; } // while( fco->next_record $fco->free_result(); // accumulate setup into order total $pstotal = rnd($prodsettot + $pstotal); $stotal = rnd($prodsettot + $stotal); $ototal = rnd($prodsettot + $ototal); $ttotal = rnd($prodsettot + $ttotal); if ($zflag1 & $flag_zonecoupon && $couponid) { // $stotal is the discounted product subtotal $cpndisc = (double) coupon_discount($couponid, $stotal, $tqty); if ($cpndisc > 0) { $shipsubtotal = rnd($shipsubtotal - $cpndisc); $taxsubtotal = rnd($taxsubtotal - $cpndisc); $stotal = rnd($stotal - $cpndisc); $ototal = rnd($ototal - $cpndisc); $ttotal = rnd($ttotal - $cpndisc); } // update the redemption counter $coupon->query("select cpnredeem,cpnmaximum from coupon where cpnid='{$couponid}'"); if ($coupon->next_record()) { $maximum = (int) $coupon->f("cpnmaximum"); $redeem = (int) $coupon->f("cpnredeem") + 1; $coupon->free_result(); if ($redeem <= $maximum) { $coupon->query("update coupon set cpnredeem={$redeem} where cpnid='{$couponid}'");