Pre-select the available coupon


  • Default avatar
    riga75    
     3 years ago
    0

    As you can see from the attached screenshots it is possible that when one is entitled to a coupon based on the points it is already pre-selected?

    thanks a lot

    stefanosot458c.png
  • Your avatar
    seyi    
     3 years ago
    +1

    Yes, will be added on next update.
  • Default avatar
    riga75    
     3 years ago
    0

    News? Thanks a lot
  • Your avatar
    seyi    
     3 years ago  last edited 3 years ago
    0

    Here is a direct fix:
    in the file www/components/com_aworewards/views/credit/tmpl/default.php, around line 61 is this:
                     <?php if ( count$this->points->payout_coupon ) == && isset( $this->points->payout_coupon['all'] ) ) { ?>
                            <input type="button" class="btn btn-success" value="<?php echo JText::_('COM_AWOREWARDS_REQUEST_COUPON_PAYMENT'); ?>" onclick="payout()" />
                            <input type="hidden" name="payout_coupon" value="all" />
                        <?php } else { ?>

    The last line <php } else { ?>, change to this:
                     <?php } elseif ( count$this->points->payout_coupon ) == ) { $row current$this->points->payout_coupon );?>
                            <input type="button" class="btn btn-success" value="<?php echo $row->description?>" onclick="payout()" />
                            <input type="hidden" name="payout_coupon" value="<?php echo $row->id?>" />
                        <?php } else { ?>

    That should do it.