Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Java by Rob ( 17 years ago )
<form id="discount-coupon-form" action="<?php echo $this->getUrl('checkout/cart/couponPost') ?>" method="post">

<input type="hidden" name="remove" id="remove-coupone" value="0"/>

 <?php if(!strlen($this->getCouponCode())): ?>
<select id="coupon_codes" name="coupon_codes">

<?php if($numCodes>0): ?>
  <option value="0">Select Amount</option>
<?php else: echo "None"; ?>
<?php endif; ?>

<?php 
 $count=1;
 while ($count<=$numCodes)
 {
  echo "<option value=".$count.">".$count."</option>";
 $count++;
 }
?>
</select>


<input type='hidden' id="coupon_code" name="coupon_code">

    <?php endif;?>
</form>





[removed]
var discountForm = new VarienForm('discount-coupon-form');
discountForm.submit = function (isRemove) {
    if (isRemove) {
        $('coupon_code').removeClassName('required-entry');
        $('remove-coupone').value = "1";
    } else {
        $('coupon_code').addClassName('required-entry');
        $('remove-coupone').value = "0";
    }
    return VarienForm.prototype.submit.bind(discountForm)();
}
[removed]

 

Revise this Paste

Children: 9132 9133
Your Name: Code Language: