Exemplo n.º 1
0
          <input type="checkbox" name="is_featured" <?php 
if ($product->is_featured) {
    echo "checked";
}
?>
> Producto destacado
        </label>
      </div>
    </div>

  </div>
  <div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Unidad</label>
    <div class="col-lg-10">
<?php 
$categories = UnitData::getAll();
if (count($categories) > 0) {
    ?>
<select name="unit_id" class="form-control">
<option value="">-- SELECCIONE UNIDAD --</option>
<?php 
    foreach ($categories as $cat) {
        ?>
<option value="<?php 
        echo $cat->id;
        ?>
" <?php 
        if ($product->unit_id == $cat->id) {
            echo "selected";
        }
        ?>