Support Forums - Classified Ads Script Osclass

Osclass plugin support => Osclass Pay Plugin => Topic started by: Loma on November 27, 2017, 05:18:37 AM

Title: Promote Feature has been finished but still visible button
Post by: Loma on November 27, 2017, 05:18:37 AM
i test with auto renew very 1 hour for one time and Promote Feature has been finished but it still visible button Promote in item

how to fix it ? does any one have this problem ?

regard

Title: Re: Promote Feature has been finished but still visible button
Post by: MB Themes on November 27, 2017, 09:01:15 AM
@Loma
You can promote listing multiple time, it should extend existing promotion.
Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on November 27, 2017, 03:10:57 PM
no only one time and it's has been finished but it still show feature button
Title: Re: Promote Feature has been finished but still visible button
Post by: MB Themes on November 27, 2017, 03:15:58 PM
@Loma
I do not think so, buttons are not hiding, and especially if you create them by yourself.
Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on November 27, 2017, 03:33:25 PM
i try in stall new fresh plugin  but it the same,
Title: Re: Promote Feature has been finished but still visible button
Post by: MB Themes on November 27, 2017, 03:41:08 PM
@Loma
I am not sure what is incorrect there.
Title: Re: Promote Feature has been finished but still visible button
Post by: reflexus on November 27, 2017, 04:57:30 PM
@Loma
I am not sure what is incorrect there.

he means that after the expiration of the promotion, the button should be hide
Title: Re: Promote Feature has been finished but still visible button
Post by: MB Themes on November 27, 2017, 06:31:54 PM
It is not button, it is informal block that shows all kind of paid promotions. Once promotion is completed, record is removed via cron and not visible anymore.
As seen in message there is still one repeat left.
Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on November 28, 2017, 04:33:47 PM
no promotion has been expired but it still  visible informal block.
i bought auto republish every 1 hour and repeat one time (26-11-2017 at 20:17PM) but now it still visible informal block.
the visible informal block should be hidden in  26-11-2017 at 21:17PM .

does i have problem with my cron ? i have test all theme and disable all plugin  but it still visible informal block.

sorry for my english

regard
Title: Re: Promote Feature has been finished but still visible button
Post by: MB Themes on November 28, 2017, 06:16:32 PM
@Loma
Can you find record for that item id in table t_osp_item and print it there?
Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on November 29, 2017, 12:55:09 PM
this  table t_osp_item.

 Now informal block are still visible

regard
Title: Re: Promote Feature has been finished but still visible button
Post by: MB Themes on November 29, 2017, 08:49:11 PM
@Loma
Thaaats really strange, that last record should be updated to 0 repeats and then to be removed.

First check if it is problem with cron.
Go to index.php of plugin and find this code (do not forget to revert changes after testing):
Code: [Select]
// EXECUTE HOURLY CRON
function osp_hourly_cron() {
  ModelOSP::newInstance()->purgeExpired();
}

change it to:
Code: [Select]
// EXECUTE HOURLY CRON
function osp_hourly_cron() {
  ModelOSP::newInstance()->purgeExpired();
}

osp_hourly_cron();

Go to homepage and refresh it, check if repeats has been decreased to 0 and then removed.


If yes, hourly cron does not work correctly in osclass (it does not call that function).


If not, got to model/ModelOSP.php
Find function: purgeExpired()

in this function there is:
Code: [Select]
  $this->dao->where(sprintf("TIMESTAMPDIFF(MINUTE, dt_expire, '%s') >= 0", date('Y-m-d H:i:s')));

Change it to:
Code: [Select]
$this->dao->where('dt_expire <= "' . date('Y-m-d H:i:s') . '"');
Go to homepage, refresh, go to user account and check if repeats has been decreased or message removed.

Let me know.

Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on November 30, 2017, 12:46:15 PM
it's still the same. informal block are still visible
Title: Re: Promote Feature has been finished but still visible button
Post by: MB Themes on November 30, 2017, 12:58:06 PM
@Loma
But it has moved, there is 0 repeats now so on next republish it will be removed.
What decreased repeats?
Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on November 30, 2017, 02:09:43 PM
it's should be removed at 11:45:55AM but now it's still visible
Title: Re: Promote Feature has been finished but still visible button
Post by: MB Themes on November 30, 2017, 02:21:22 PM
@Loma
Can you repeat procedures I gave you yesterday?
One by one, check which one helps so we know where is problem.
Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on November 30, 2017, 02:58:44 PM
Dear MB Themes!
check your Message, i have send PM with FTP Account
with my web URL, help to check it

regard
Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on December 01, 2017, 04:18:41 AM
just renew ad in auto republish feature  but why it show 12 hours ago?
i have 30 ads post in 1 hour  and i want renew ad go to the top of it . so it may be just now or 1 minute ago .

regard
Title: Re: Promote Feature has been finished but still visible button
Post by: MB Themes on December 01, 2017, 09:05:00 AM
@Loma
I will check issues on your server as soon as I get time.
I would recommend to check if time in database is correct, I have experience where datetime of server was not same to datetime of database, however plugin use just PHP timestamps so it should not be issue.
Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on December 01, 2017, 11:23:06 AM
how can i check time in database?
Title: Re: Promote Feature has been finished but still visible button
Post by: MB Themes on December 01, 2017, 11:38:09 AM
@Loma
in table t_item it's column dt_pub_date... ID of item is pk_i_id col.
Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on December 02, 2017, 06:28:04 AM
this's my item date in database Please help to check it
Title: Re: Promote Feature has been finished but still visible button
Post by: MB Themes on December 02, 2017, 09:16:37 AM
@Loma
I will, just FYI I am running some other sites and identified that even you have cron corretly setup, functions added into cron does not work correctly, still not sure what cause it, but it might be osclass bug.
Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on December 03, 2017, 05:35:02 AM
i'm sure my cron work correctly
Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on December 03, 2017, 05:42:46 AM
i think it not osclass bug because republish feature work correct but only auto republish feature not work correct it's show 12 hour ago ?
How can i change it to just now or 1 minute ago

regard
Title: Re: Promote Feature has been finished but still visible button
Post by: MB Themes on December 03, 2017, 08:43:52 AM
It is because republish does not work with cron. I am checking that and should have more data on monday
Title: Re: Promote Feature has been finished but still visible button
Post by: Loma on December 03, 2017, 12:38:13 PM
Ok any update please let's me know
Title: Re: Promote Feature has been finished but still visible button
Post by: Claso co.ltd on December 22, 2017, 02:05:28 AM

Quote
First check if it is problem with cron.
Go to index.php of plugin and find this code (do not forget to revert changes after testing):
Code: [Select]
// EXECUTE HOURLY CRON
function osp_hourly_cron() {
  ModelOSP::newInstance()->purgeExpired();
}

change it to:
Code: [Select]
// EXECUTE HOURLY CRON
function osp_hourly_cron() {
  ModelOSP::newInstance()->purgeExpired();
}

osp_hourly_cron();

it's work find for me ,
@ MB Themes can you fix this code in next version, i use version 1.3.5 but  still have problem
Title: Re: Promote Feature has been finished but still visible button
Post by: Claso co.ltd on December 22, 2017, 02:08:45 AM
@MB Themes

I have the same issue, why it now show just now or 1 minute ago? it's show 12 hours ago

Quote
just renew ad in auto republish feature  but why it show 12 hours ago?
i have 30 ads post in 1 hour  and i want renew ad go to the top of it . so it may be just now or 1 minute ago .

regard