*

abhkhan

  • ***
  • 60 posts
What is the code to place in item.php
« on: March 24, 2018, 09:21:46 AM »
Where can i found the code for item.php to show the promotion button for sellers only, on his item page.
I have to remove auto hook code for plugin for some reason.
 

*

MB Themes

Re: What is the code to place in item.php
« Reply #1 on: March 24, 2018, 12:45:12 PM »
It is this function:
osp_show_item_promote
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

abhkhan

  • ***
  • 60 posts
Re: What is the code to place in item.php
« Reply #2 on: March 25, 2018, 05:22:55 AM »
I've tried the following code but it's not showing the promote options

Code: [Select]
osc_add_hook ('item_detail', osp_show_item_promote)

*

MB Themes

Re: What is the code to place in item.php
« Reply #3 on: March 25, 2018, 03:46:20 PM »
You must use that function, not hook.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

abhkhan

  • ***
  • 60 posts
Re: What is the code to place in item.php
« Reply #4 on: March 26, 2018, 06:43:52 AM »
Code: [Select]
<?php if(function_exists('osp_show_item_promote')) { echo osp_show_item_promote(); } ?>
not working!!!!!!


*

MB Themes

Re: What is the code to place in item.php
« Reply #5 on: March 26, 2018, 09:52:35 AM »
Code: [Select]
function osp_show_item_promote($item) {
  if(osc_is_web_user_logged_in() && osc_logged_user_id() == $item['fk_i_user_id'] || osc_is_admin_user_logged_in()) {
    include_once 'user/item_post.php';
  }
}

Custom modifications are not covered by support, it's on you.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

abhkhan

  • ***
  • 60 posts
Re: What is the code to place in item.php
« Reply #6 on: March 27, 2018, 05:34:02 AM »
when am I entering the above code in item.php the right sidebar disappears?

can you please help me in why I am getting this error.

*

Dawid

  • ****
  • 149 posts
Re: What is the code to place in item.php
« Reply #7 on: March 27, 2018, 03:37:00 PM »
whats file "item.php" You change  ?? in Theme folder? or item file in folder osc_pay plugin ?

*

abhkhan

  • ***
  • 60 posts
Re: What is the code to place in item.php
« Reply #8 on: March 28, 2018, 04:45:59 AM »
I put the above code in theme's folder item.php,