orobouros Posted September 23, 2016 Report Share Posted September 23, 2016 (edited) Hello, i hope i'll find someone able to help me because i've try several solutions without any result. My problem is that i want bids to auto cancel after 24 ou 48 hours if the pilot doesn't fly for his bid. I've try to setup auto cancellation in local.config.php like that: # Whether to close any bids after a certain amount of time Config::Set('CLOSE_BIDS_AFTER_EXPIRE', true); Config::Set('BID_EXPIRE_TIME', '24'); so, no result after several tries. I've try the solution given by Nabeel in this (old) post : http://forum.phpvms....bids#entry15404 I've inserted the code in differents lines and test, but without result too. Can someone help me to solve this big problem, because i can't launch the new version of my VA website without solving this ? Many thanks for helping me Edited September 23, 2016 by orobouros Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 10, 2016 Moderators Report Share Posted October 10, 2016 (edited) you'll need to do a cron job in your cpanel after setting "BID_EXPIRE_TIME". What I did instead was I added a code to frontpage_main.php to cancel the old bids once my website was opened by anyone. Here is the code. Just add it to the top of your "frontpage_main.php" after setting "BID_EXPIRE_TIME": <?php SchedulesData::deleteExpiredBids();?> Edited October 10, 2016 by parkho Quote Link to comment Share on other sites More sharing options...
orobouros Posted October 21, 2016 Author Report Share Posted October 21, 2016 Sorry for the late answer. I can't do a cron job because it's not a dedicated server. Auto cancellation seems to have a strange behaviour. I've set 48 in the local config file and it works (48 hours delay). But if i set 24 it doesn't work. So i've set 48 hours and it's ok. Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted October 22, 2016 Moderators Report Share Posted October 22, 2016 I do not believe that the problem is with the hours. If you are using simpilot's version, there was a minor bug in the system's core files and I have already submitted a pull request on github for that. The bug has to do with true/false flags cause the script seems to run only when you set the setting to false. Open your admin/maintenance.php and find this: if(Config::Get('CLOSE_BIDS_AFTER_EXPIRE') === false) { and replace it with this: if(Config::Get('CLOSE_BIDS_AFTER_EXPIRE') === true) { Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.