Jump to content

Recommended Posts

Posted (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 by orobouros
  • 3 weeks later...
  • Moderators
Posted (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 by parkho
  • 2 weeks later...
Posted

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.

  • Moderators
Posted

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

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...