<ul class="isl-nodetree">
  <li>
    <div>

      <div class="isl-margin">
        If the customer buys
        <input type="number" name="<?php echo $module_setting; ?>[condition_min_quantity]" value="<?php echo $setting['item']['condition_min_quantity']; ?>" min="1" class="form-control input-sm isl-inline-block isl-w-xs isl-mh-5" required>
        <label class="isl-p0 isl-mr-5" data-toggle="tooltip" title="Select this option to apply only once regardless of how many products are purchased."><input type="checkbox" name="<?php echo $module_setting; ?>[apply_once]" value="1" <?php echo $setting['item']['apply_once'] ? 'checked' : ''; ?>> (or more)</label>
        units from the following categories,
      </div>
      <div class="isl-margin isl-w-l">
        <input type="text" placeholder="Type category name" data-isl-autocomplete='{"type":"category", "target":"isl-autocomplete-a", "name":"<?php echo $module_setting; ?>[condition_category_ids][]"}' class="form-control input-sm">
        <div class="well well-sm isl-well isl-autocomplete-a">
          <?php foreach ($condition_category_ids_data as $category) { ?>
            <div class="isl-autocomplete-a<?php echo $category['category_id']; ?>"><i class="fa fa-minus-circle pointer"></i> <?php echo $category['path'] ? $category['path'] . '&nbsp;&nbsp;&gt;&nbsp;&nbsp;' . $category['name'] : $category['name']; ?><input type="hidden" name="<?php echo $module_setting; ?>[condition_category_ids][]" value="<?php echo $category['category_id']; ?>"></div>
          <?php } ?>
        </div>
      </div>

    </div>
  </li>
  <li>
    <div>

      <div class="isl-margin">
        then they get
        <input type="number" name="<?php echo $module_setting; ?>[discount_quantity]" value="<?php echo $setting['item']['discount_quantity']; ?>" min="1" class="form-control input-sm isl-inline-block isl-w-xs isl-mh-5" required>
        units from the same category for free.
      </div>

    </div>
  </li>
</ul>

<script>
$(document).trigger('isl.autocomplete');
</script>
