Osclass Support Forums

Osclass plugin support => Backoffice Manager Plugin => Topic started by: kriskoyk on December 29, 2020, 01:02:46 PM

Title: Repeat auto-republish.
Post by: kriskoyk on December 29, 2020, 01:02:46 PM
After the first auto-republish it goes back to "Disabled", while I put the ad to play 20 times
Title: Re: Repeat auto-republish.
Post by: MB Themes on December 30, 2020, 03:45:30 PM
@kriskoyk
Can you please provide more details?
Title: Re: Repeat auto-republish.
Post by: kriskoyk on December 30, 2020, 04:49:05 PM
I set the auto-republish to be done 20 times. The first auto-republisht is made and then the indication is "Disabled" and no new auto-republish is made.
Title: Re: Repeat auto-republish.
Post by: kriskoyk on January 02, 2021, 10:56:22 AM
Do we have news about the problem?
Title: Re: Repeat auto-republish.
Post by: kriskoyk on January 03, 2021, 08:38:43 PM
New remark: I have an ad for 5 days and I put the ad for automatic renewal 20 times. After 5 days, the first update is done automatically and then the selection was automatically changed to "Disabled" resulting in the cessation of automatic republishing. With "Disabled" in its place, I changed the ad to "Premium" and after 5 days the ad was automatically reposted
     
 I do not know what is happening and I can not solve the problem.
Title: Re: Repeat auto-republish.
Post by: MB Themes on January 04, 2021, 01:22:13 PM
@kriskoyk
Do you have requirement user must valdiate it's listing?
Title: Re: Repeat auto-republish.
Post by: kriskoyk on January 04, 2021, 01:59:25 PM
No, it is not checked
Title: Re: Repeat auto-republish.
Post by: MB Themes on January 07, 2021, 09:01:05 AM
@kriskoyk
Reviewed plugin and there is just one setting that can change if item is active or no:
When listing is republished, validation by admin is required (3)

If you enable it, listing will be republished as inactive for re-validation purpose.
Title: Re: Repeat auto-republish.
Post by: kriskoyk on January 07, 2021, 12:14:37 PM
It was not checked. I will check it to try this too. (If it works this way, the administrator will need to validate all reposted ads. Can it work without requiring administrator validation?)
Title: Re: Repeat auto-republish.
Post by: kriskoyk on January 07, 2021, 12:31:19 PM
Remember also that after the first renewal while I had put "30 times" she went to "Disabled" .
Title: Re: Repeat auto-republish.
Post by: MB Themes on January 07, 2021, 03:55:09 PM
It was not checked. I will check it to try this too. (If it works this way, the administrator will need to validate all reposted ads. Can it work without requiring administrator validation?)

Yes, it must be unchecked.
Title: Re: Repeat auto-republish.
Post by: kriskoyk on January 07, 2021, 08:48:16 PM
Probably with my bad English the problem was not understood.
I describe it again:
Ad validation requirement is not enabled everywhere.
For the renewal I put 30 times.
The refresh is done once at the end of the ad.
The new indication for renewal is deactivated immediately and no further renewal takes place.
Title: Re: Repeat auto-republish.
Post by: MB Themes on January 08, 2021, 08:22:48 AM
@kriskoyk
Oki, so our problem is:
- you setup republish XY times
- first republish works well, but:
- after first republish, instead of having 29 other republishes, data in plugin are corrupted and you got no other republish

Is that right?
Title: Re: Repeat auto-republish.
Post by: kriskoyk on January 08, 2021, 11:15:00 AM
-Yes right, after first republish, instead of having 29 other republishes, the box looks "disabled" and  do not make the other 29 posts
Title: Re: Repeat auto-republish.
Post by: MB Themes on January 08, 2021, 02:57:09 PM
Thank you, will check it out.
Title: Re: Repeat auto-republish.
Post by: kriskoyk on June 12, 2021, 09:01:32 PM
Do we have control results?
Title: Re: Repeat auto-republish.
Post by: MB Themes on June 14, 2021, 08:45:43 AM
@kriskoyk
Checked code.
This is from model to do updates in DB.
Code: [Select]
  public function republish_times( $item_id ) {
    return $this->dao->query('UPDATE '.$this->getTable_ItemBO().' SET republish_times=coalesce(republish_times, 0)+1 WHERE item_id='.$item_id);
  }

  public function republish_auto( $item_id ) {
    return $this->dao->query('UPDATE '.$this->getTable_ItemBO().' SET republish_auto=coalesce(republish_auto, 0)-1 WHERE item_id='.$item_id);
  }

It looks OK.

You can test republish by adding this code i.e. to theme functions.php and refreshing page.
Code: [Select]
ModelBO::newInstance()->republish_item( 284, '2021-01-01', null, false, true);
-> 284 is item id, then you have publish date, then expire date...
Title: Re: Repeat auto-republish.
Post by: kriskoyk on May 31, 2022, 06:24:10 PM
This problem that I have not solved yet let's try to solve. This code-ModelBO::newInstance()->republish_item( 284, '2021-01-01', null, false, true);-, that I have to put, that I find "theme functions.php" and "refreshing page"?
Title: Re: Repeat auto-republish.
Post by: MB Themes on June 01, 2022, 10:17:55 AM
I recommend not go into code changes if you are not sure what to do, use only plugin functions.
If you believe this is bug, create support ticket and provide details how to reproduce.