It seems that Zencart has a bug in processing Zero total orders, so I came with a work around for now..
In the checkout page I ask the customer to go to previous page for verification and the 2nd run solved the issue. [I was having this issue with Paypal]
HTML Code:
$customtotal= $order->info['total'];
$paypalyes = $GLOBALS[$class]->title;
if ($customtotal <=0 && $paypalyes=='PayPal') {
echo 'Detected discount. <a href="/index.php?main_page=checkout_shipping">Click here to Verify and proceed</a>.';
}
and to deal with submit button:
HTML Code:
<? if ($customtotal <=0 && $paypalyes=='PayPal') { } else { ?>
<?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDER, BUTTON_CONFIRM_ORDER_ALT, 'name="btn_submit" id="btn_submit"') ;?></div>
<? } ?>
I hope this issue is solved by Zerncart team soon.