Jump to content

Problem with bids auto cancellation


orobouros

Recommended Posts

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 by orobouros
Link to comment
Share on other sites

  • 3 weeks later...
  • Moderators

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 by parkho
Link to comment
Share on other sites

  • 2 weeks later...
  • Moderators

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) {

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...