*

mazenelmasry

  • **
  • 12 posts
not show the sellers numbers in the ads page !
« on: September 23, 2017, 11:56:09 AM »
I used "Veronika" and now I want to use "Patricia" but when replacing the template did not show the sellers numbers in the advertisement page, I sent an example

*

MB Themes

Re: not show the sellers numbers in the ads page !
« Reply #1 on: September 23, 2017, 12:01:00 PM »
Each theme use different place to stote number as by default osclass has none.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mazenelmasry

  • **
  • 12 posts
Re: not show the sellers numbers in the ads page !
« Reply #2 on: September 23, 2017, 12:06:26 PM »
what is the solution now ?  :-[

*

MB Themes

Re: not show the sellers numbers in the ads page !
« Reply #3 on: September 23, 2017, 12:49:16 PM »
@mazenelmasry
You can copy data from veronika item data table into item table and replace field s_city_area or use veronika function to get phone number in combination with patricia's functions.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

MB Themes

Re: not show the sellers numbers in the ads page !
« Reply #4 on: September 23, 2017, 01:37:34 PM »
@mazenelmasry
Into functions.php (at start place function):
Code: [Select]
function patricia_item_extra($item_id) {
  if($item_id > 0) {
    $db_prefix = DB_TABLE_PREFIX;

    $query = "SELECT * FROM {$db_prefix}t_item_veronika s WHERE fk_i_item_id = " . $item_id . ";";
    $result = Item::newInstance()->dao->query( $query );
    if( !$result ) {
      $prepare = array();
      return false;
    } else {
      $prepare = $result->row();
      return $prepare;
    }
  }
}

In item.php find this code:
Code: [Select]
              $mobile = '';
              if($mobile == '') { $mobile = osc_item_city_area(); }     
              if($mobile == '' && osc_item_user_id() <> 0) { $mobile = $item_user['s_phone_mobile']; }     
              if($mobile == '' && osc_item_user_id() <> 0) { $mobile = $item_user['s_phone_land']; }     
              if($mobile == '') { $mobile = __('No phone number', 'patricia'); }   

and replace it with:
Code: [Select]
              $item_extra = patricia_item_extra( osc_item_id() );
              $mobile = $item_extra['s_phone'];
              if($mobile == '') { $mobile = osc_item_city_area(); }     
              if($mobile == '' && osc_item_user_id() <> 0) { $mobile = $item_user['s_phone_mobile']; }     
              if($mobile == '' && osc_item_user_id() <> 0) { $mobile = $item_user['s_phone_land']; }     
              if($mobile == '') { $mobile = __('No phone number', 'patricia'); }   

This will work if table t_item_veronika is still in your database and you have not removed it.

  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots