oc-content/themes/veronika/functions.php
// ADD TRANSACTION AND CONDITION TO OC-ADMIN EDIT ITEM
ADD TRANSACTION AND CONDITION TO OC-ADMIN EDIT ITEM
ADD TRANSACTION AND CONDITION TO OC - ADMIN EDIT ITEM
function veronika_extra_add_admin( $catId = null, $item_id = null ){
  $current_url = ($_SERVER['HTTPS'] == 'on' ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
  $admin_url = osc_admin_base_url();
  if (strpos($current_url, $admin_url) !== false) {
    if($item_id > 0) {
      $item = Item::newInstance()->findByPrimaryKey( $item_id );
      $item_extra = veronika_item_extra( $item_id );
      echo '<div class="control-group">';
      echo '<label class="control-label" for="sTransaction">' . __('Transaction', 'veronika') . '</label>';
      echo '<div class="controls">' . veronika_simple_transaction(true, $item_id <> '' ? $item_id : false) . '</div>';
      echo '</div>';
      echo '<div class="control-group">';
      echo '<label class="control-label" for="sCondition">' . __('Condition', 'veronika') . '</label>';
      echo '<div class="controls">' . veronika_simple_condition(true, $item_id <> '' ? $item_id : false) . '</div>';
      echo '</div>';
      echo '<div class="control-group">';
      echo '<label class="control-label" for="sPhone">' . __('Phone', 'veronika') . '</label>';
      echo '<div class="controls"><input type="text" name="sPhone" id="sPhone" value="' . $item_extra['s_phone'] . '" /></div>';
      echo '</div>';
      echo '<div class="control-group">';
      echo '<label class="control-label" for="sSold">' . __('Item Sold', 'veronika') . '</label>';
      echo '<div class="controls"><input type="checkbox" name="sSold" id="sSold" ' . ($item_extra['i_sold'] == 1 ? 'checked' : '') . ' /></div>';
      echo '</div>';
    }
  }
}
function veronika_extra_add_admin ( $ catId = null , $ item_id = null ) { $ current_url = ( $ _SERVER [ 'HTTPS' ] == 'on' ? 'https' : 'http' ) . '://' . $ _SERVER [ 'HTTP_HOST' ] . $ _SERVER [ 'REQUEST_URI' ] ; $ admin_url = osc_admin_base_url ( ) ; if ( strpos ( $ current_url , $ admin_url ) !== false ) { if ( $ item_id > 0 ) { $ item = Item :: newInstance ( ) -> findByPrimaryKey ( $ item_id ) ; $ item_extra = veronika_item_extra ( $ item_id ) ; echo '<div class="control-group">' ; echo '<label class="control-label" for="sTransaction">' . __ ( 'Transaction' , 'veronika' ) . '</label>' ; echo '<div class="controls">' . veronika_simple_transaction ( true , $ item_id <> '' ? $ item_id : false ) . '</div>' ; echo '</div>' ; echo '<div class="control-group">' ; echo '<label class="control-label" for="sCondition">' . __ ( 'Condition' , 'veronika' ) . '</label>' ; echo '<div class="controls">' . veronika_simple_condition ( true , $ item_id <> '' ? $ item_id : false ) . '</div>' ; echo '</div>' ; echo '<div class="control-group">' ; echo '<label class="control-label" for="sPhone">' . __ ( 'Phone' , 'veronika' ) . '</label>' ; echo '<div class="controls"><input type="text" name="sPhone" id="sPhone" value="' . $ item_extra [ 's_phone' ] . '" /></div>' ; echo '</div>' ; echo '<div class="control-group">' ; echo '<label class="control-label" for="sSold">' . __ ( 'Item Sold' , 'veronika' ) . '</label>' ; echo '<div class="controls"><input type="checkbox" name="sSold" id="sSold" ' . ( $ item_extra [ 'i_sold' ] == 1 ? 'checked' : '' ) . ' /></div>' ; echo '</div>' ; } } }
ADD TRANSACTION AND CONDITION TO OC-ADMIN EDIT ITEM
ADD TRANSACTION AND CONDITION TO OC - ADMIN EDIT ITEM