*

kriskoyk

  • *****
  • 394 posts
Re: Transaction Display in Back Office When Adding a New Post
« Reply #15 on: July 29, 2025, 02:40:58 PM »
That is, when adding a new post from the backoffice, the "Phone" option does not appear, while when editing a post, the "Phone" option appears normally. The theme is BETA

*

MB Themes

Re: Transaction Display in Back Office When Adding a New Post
« Reply #16 on: July 29, 2025, 04:56:58 PM »
in functions.php search for $item_id > 0 and OC_ADMIN ... comment this line(s) with item id conditoin.

It's in function bet_extra_add_admin
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 394 posts
Re: Transaction Display in Back Office When Adding a New Post
« Reply #17 on: July 29, 2025, 06:04:25 PM »
Is this the code?
Code: [Select]
// ADD TRANSACTION AND CONDITION TO OC-ADMIN EDIT ITEM
function bet_extra_add_admin( $catId = null, $item_id = null ){
 
 if(defined('OC_ADMIN') && OC_ADMIN === true) {
   
if($item_id > 0) {
      $item = Item::newInstance()->findByPrimaryKey( $item_id );
      $item_extra = bet_item_extra( $item_id );

      echo '<div class="control-group">';
      echo '<label class="control-label" for="sTransaction">' . __('Transaction', 'beta') . '</label>';
      echo '<div class="controls">' . bet_simple_transaction(true, $item_id <> '' ? $item_id : false) . '</div>';
      echo '</div>';

      echo '<div class="control-group">';
      echo '<label class="control-label" for="sCondition">' . __('Condition', 'beta') . '</label>';
      echo '<div class="controls">' . bet_simple_condition(true, $item_id <> '' ? $item_id : false) . '</div>';
      echo '</div>';

      echo '<div class="control-group">';
      echo '<label class="control-label" for="sPhone">' . __('Phone', 'beta') . '</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', 'beta') . '</label>';
      echo '<div class="controls"><input type="checkbox" name="sSold" id="sSold" ' . ($item_extra['i_sold'] == 1 ? 'checked' : '') . ' /></div>';
      echo '</div>';
    }
  }
}

osc_add_hook('item_form', 'bet_extra_add_admin');
osc_add_hook('item_edit', 'bet_extra_add_admin');

And what should I replace it with?

Marked as best answer by frosticek on July 31, 2025, 09:13:06 AM
*

MB Themes

Re: Transaction Display in Back Office When Adding a New Post
« Reply #18 on: July 30, 2025, 05:26:41 PM »
Correct,
change if($item_id > 0) { to if($item_id > 0 || 1==1) {
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 394 posts
Re: Transaction Display in Back Office When Adding a New Post
« Reply #19 on: July 30, 2025, 08:02:50 PM »
Very nice, perfect! Thanks.

(Νote: This setting is missing from all the free themes I tested. You should check to see if it is missing from all the paid themes as well.)

*

MB Themes

Re: Transaction Display in Back Office When Adding a New Post
« Reply #20 on: July 31, 2025, 09:12:59 AM »
Will do, thanks.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots