Setting / Field Checked or Filled Out By Default


  • Default avatar
    tom399    
     a year ago
    0

    We need to almost always used the setting "exclude discounted products".

    How can we have this checked by default?  I would rather uncheck it the 1 or 2 times it will be not needed.  Also, the same for number of uses total we would like a default for.
  • Your avatar
    seyi    
     a year ago
    0

    You can update the code to do this, but would loose such modification on upgrade.

    In the file F:\extensions\com_www\administrator\components\com_awocoupon\awocoupon\admin\view\coupon\edit.php, around line 983 is this:
                      <input class="inputbox" type="checkbox" name="exclude_discounted" value="1" <?php echo == $data->row->exclude_discounted 'CHECKED' ''?> id="id_checkbox_excludediscounted" />

    Change it to this:
                      <input class="inputbox" type="checkbox" name="exclude_discounted" value="1" <?php echo ! empty( $data->row->id ) ? ( == $data->row->exclude_discounted 'CHECKED' '' ) : 'CHECKED'?> id="id_checkbox_excludediscounted" />