Re: Re: Re: Re: Re: Re: Re: Alpha /e and Coupon Contribution

Posts: 6
Joined: 10/11/2007

I'm no developer, but after looking at the new (alpha 7e) uc_cart_checkout_pane.inc, I made changes to the coupon module's uc_checkout_pane_coupon function that appear to work from my limited testing:

Here's what I changed the uc_checkout_pane_coupon function to:

<?php
function uc_checkout_pane_coupon($op, $arg1, $arg2) {
  switch (
$op) {
    case
'view':
     
$description = t('Enter your coupon here.');
     
$contents['coupon'] = uc_textfield(t('Coupon Code'), $arg1->couponCode, FALSE, FALSE, 14);             
    
      return array(
'description' => $description, 'contents' => $contents);

    case
'process':
     
$arg1->coupon = check_plain($arg2['coupon']);
      return
true;
  }
}
?>

Alpha /e and Coupon Contribution By: oslinux (46 replies) Mon, 10/08/2007 - 04:01