Osclass Support Forums

Osclass plugin support => SMS Payments Plugin => Topic started by: abhkhan on March 23, 2018, 07:38:13 AM

Title: How to show promote button to only Listing's User?
Post by: abhkhan on March 23, 2018, 07:38:13 AM
Currently, the provided code to show promote button is showing the button to all users.

How to make this button only shown to users who posted that listing. Other viewers shouldn't see this button, as the listing product owner only wants to promote the listing.
Title: Re: How to show promote button to only Listing's User?
Post by: MB Themes on March 23, 2018, 09:31:24 AM
@abhkhan
You can wrap button into code:
Code: [Select]
<?php if(osc_item_user_id() > && osc_item_user_id() == osc_logged_user_id()) { ?>
....button
<?php ?>

Title: Re: How to show promote button to only Listing's User?
Post by: abhkhan on March 23, 2018, 12:30:08 PM
@abhkhan
You can wrap button into code:
Code: [Select]
<?php if(osc_item_user_id() > && osc_item_user_id() == osc_logged_user_id()) { ?>
....button
<?php ?>


Thanks, but you missed the semicolon ( ;)  :)
Code: [Select]
  <?php ;  } ?> 
Title: Re: How to show promote button to only Listing's User?
Post by: MB Themes on March 23, 2018, 12:39:48 PM
@abhkhan
I did not, it should not be there.