This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Smithtech

  • ****
  • 219 posts
"Users can disable / de-activate listing" NOT working in Gamma
« on: December 25, 2020, 03:50:31 AM »
I have enabled Users can disable / de-activate listing but users do not see the option to disable their listings. Only Remove and Edit that they see.
Can you please help solve this?

*

MB Themes

Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #1 on: December 25, 2020, 01:54:34 PM »
@support
Make sure to update user-items.php based on what you have in sigma theme.
As this feature to disable listings is new, most themes does not have implemented this option.
If you open user-items.php or loop-single.php (loop-single-premium.php), you will find code similar to this one:
Code: [Select]
            <?php if(osc_item_is_inactive()) {?>
              <a href="<?php echo osc_item_activate_url();?>" ><?php _e('Activate''sigma'); ?></a>
            <?php ?>

You must add there also following code bellow:
Code: [Select]
            <?php if(osc_item_is_active() && osc_can_deactivate_items()) {?>
              <a href="<?php echo osc_item_deactivate_url();?>" ><?php _e('Deactivate''sigma'); ?></a>
            <?php ?>

To allow renewal of expired listings, you must also add this code:
Code: [Select]
            <?php if(osc_item_can_renew()) { ?>
              <a href="<?php echo osc_item_renew_url();?>" ><?php _e('Renew''sigma'); ?></a>
            <?php ?>

So integration into themes is quite simple  8)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Smithtech

  • ****
  • 219 posts
Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #2 on: December 25, 2020, 11:44:36 PM »
Thank you very much.
I'm not sure I understand your instructions very well.
I'm using Gamma theme. I tried the code below in Gamma

<?php if(osc_item_is_active() && osc_can_deactivate_items()) {?>
              <a href="<?php echo osc_item_deactivate_url();?>" ><?php _e('Deactivate', 'gamma'); ?></a>
            <?php } ?>
When I "Deactivate" is clicked, it returns 404 error. Page not found.
And also, the Renew button is not showing.


Marked as best answer by support on January 05, 2021, 11:59:24 AM
*

MB Themes

Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #3 on: December 26, 2020, 01:07:07 PM »
@support
Go to permalinks setting and properly update slugs for deactivate and renewal options. It may seems to be OK, but sometimes it is required to "refresh" this option.
Renewal is shown just for expired listings.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Smithtech

  • ****
  • 219 posts
Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #4 on: January 05, 2021, 11:59:05 AM »
Thank you. It worked fine.

*

omadmin

  • ***
  • 22 posts
Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #5 on: January 27, 2021, 04:13:07 PM »
@support
Make sure to update user-items.php based on what you have in sigma theme.
As this feature to disable listings is new, most themes does not have implemented this option.
If you open user-items.php or loop-single.php (loop-single-premium.php), you will find code similar to this one:
Code: [Select]
            <?php if(osc_item_is_inactive()) {?>
              <a href="<?php echo osc_item_activate_url();?>" ><?php _e('Activate''sigma'); ?></a>
            <?php ?>

You must add there also following code bellow:
Code: [Select]
            <?php if(osc_item_is_active() && osc_can_deactivate_items()) {?>
              <a href="<?php echo osc_item_deactivate_url();?>" ><?php _e('Deactivate''sigma'); ?></a>
            <?php ?>

To allow renewal of expired listings, you must also add this code:
Code: [Select]
            <?php if(osc_item_can_renew()) { ?>
              <a href="<?php echo osc_item_renew_url();?>" ><?php _e('Renew''sigma'); ?></a>
            <?php ?>

So integration into themes is quite simple  8)

Is This available for newest osclass version? also i need activate and deactive listing on user pages on gamma themes
an Website Specialist

*

omadmin

  • ***
  • 22 posts
Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #6 on: January 27, 2021, 05:00:43 PM »
Did Not Work Sir... i use newest version osclass 4.3.1 and i have tested function of deactive / activate but still confuse how to correctly for this. I try on listing moderation

Code: [Select]

<?php if(osc_item_is_inactive()) {?>
 <div class="ua-premium inactive"><span><?php _e('tidak aktif''gamma'); ?></span></div>
                    <?php } else if(osc_item_is_expired()) { ?>
                       <div class="ua-premium expired"><span><?php _e('kadaluarsa''gamma'); ?></span></div>
                    <?php } else if(osc_item_is_premium()) { ?>
                      <div class="ua-premium mbBg3" title="<?php _e('Iklan Premium''gamma'); ?>"><?php _e('Premium''gamma'); ?></div>
                    <?php ?>
                  </div>


Which one is wrong?
an Website Specialist

*

MB Themes

Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #7 on: January 27, 2021, 05:21:08 PM »
You can find functional examples inside sigma theme.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

omadmin

  • ***
  • 22 posts
Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #8 on: February 07, 2021, 05:05:50 PM »
You can find functional examples inside sigma theme.

hehehe i use gamma themes.. i dont understand where is sigma
an Website Specialist

*

MB Themes

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

*

Smithtech

  • ****
  • 219 posts
Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #10 on: May 30, 2021, 03:56:44 AM »
@support
Make sure to update user-items.php based on what you have in sigma theme.
As this feature to disable listings is new, most themes does not have implemented this option.
If you open user-items.php or loop-single.php (loop-single-premium.php), you will find code similar to this one:
Code: [Select]
            <?php if(osc_item_is_inactive()) {?>
              <a href="<?php echo osc_item_activate_url();?>" ><?php _e('Activate''sigma'); ?></a>
            <?php ?>

You must add there also following code bellow:
Code: [Select]
            <?php if(osc_item_is_active() && osc_can_deactivate_items()) {?>
              <a href="<?php echo osc_item_deactivate_url();?>" ><?php _e('Deactivate''sigma'); ?></a>
            <?php ?>

To allow renewal of expired listings, you must also add this code:
Code: [Select]
            <?php if(osc_item_can_renew()) { ?>
              <a href="<?php echo osc_item_renew_url();?>" ><?php _e('Renew''sigma'); ?></a>
            <?php ?>

So integration into themes is quite simple  8)


Can these functionalities be added to the Gamma theme once and for all? I have done this before but it is nowhere to be found today because I have updated the theme several times. It is becoming confusing and you will have to be checking which theme files to add the code to.
And also, can they also appear as buttons to make the user dashboard nicer?  Redesigning that page will be very nice.

I hope this functionality has been around for a while now and can be integrated to the Gamma theme since the use of child themes to save theme customizations after updates doesn't really work.


Thank you very much.



« Last Edit: May 30, 2021, 10:17:14 AM by support »

*

MB Themes

Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #11 on: May 31, 2021, 08:15:05 PM »
@support
It will be integrated.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Smithtech

  • ****
  • 219 posts
Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #12 on: June 01, 2021, 03:21:03 AM »
Alright.
Thank you.

*

Nail

  • **
  • 20 posts
Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #13 on: June 12, 2021, 12:31:02 PM »
@support
It will be integrated.

When it will be integrated. I have the same problem.

*

MB Themes

Re: "Users can disable / de-activate listing" NOT working in Gamma
« Reply #14 on: June 12, 2021, 12:46:05 PM »
There is solution posted wbove
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots