Thank you again for your help.
I figured out how to do just what I wanted to do. It was a matter of banging my head against the wall till 4:00AM last night, then waking up and understanding it perfectly. (;
So, now there's a redeem button right next to where the user enters their GV code, and there's separate instructions for applying the balance provided that the user has a balance. They even show up on top of the redemption.
I've included a couple of screen shots to illustrate, one before a GV is entered, and one from after.
In tpl_checkout_payment_default.php, I changed
Code:
<fieldset>
<legend><?php echo $selection[$i]['module']; ?></legend>
<?php echo $selection[$i]['redeem_instructions']; ?>
<div class="gvBal larger"><?php echo $selection[$i]['checkbox']; ?></div>
<label class="inputLabel"<?php echo ($selection[$i]['fields'][$j]['tag']) ? ' for="'.$selection[$i]['fields'][$j]['tag'].'"': ''; ?>><?php echo $selection[$i]['fields'][$j]['title']; ?></label>
<?php echo $selection[$i]['fields'][$j]['field']; ?>
</fieldset>
Code:
<fieldset>
<legend><?php echo $selection[$i]['module']; ?></legend>
<?php echo $selection[$i]['checkbox']; ?>
<?php echo $selection[$i]['redeem_instructions']; ?>
<label class="inputLabel"<?php echo ($selection[$i]['fields'][$j]['tag']) ? ' for="'.$selection[$i]['fields'][$j]['tag'].'"': ''; ?>><?php echo $selection[$i]['fields'][$j]['title']; ?></label>
<?php echo $selection[$i]['fields'][$j]['field']; ?>
<?php echo zen_image_submit(BUTTON_IMAGE_REDEEM, BUTTON_REDEEM_ALT, 'onclick="submitFunction('.zen_user_has_gv_account($_SESSION['customer_id']).','.$order->info['total'].')"'); ?>
</fieldset>
</script>
I didn't add a new text field, I just modified MODULE_ORDER_TOTAL_GV_USER_PROMPT.
And, of course, I'm pretty new to ZC and e-commerce. Feel free to tell me I've corrupted the system. (;
Bookmarks