v4.0.x Renewal ads change dateadd for today

Discussion in 'Modules / Plugins / Modifications' started by hel68c, Apr 8, 2009.

  1. hel68c Customer

    Hi,

    Does someone could help me on this small change.

    I would like when there is an ad renewal, the "date added" in the listing change for today.

    I think the function is updateorder in order.php
  2. Eric Barnes Guest

    I would say alter the Listings -> setExpiration.

    Find this:
    $sSQL="UPDATE ".PREFIX."listings SET expiration='".$expiration ." ". $time ."' WHERE ";

    Replace with:
    Code:
    if($renewal) {
    $sSQL="UPDATE ".PREFIX."listings SET dateadded = '". date("Y-m-d H:i:s") ."', expiration='".$expiration ." ". $time ."' WHERE ";
    } else {
    $sSQL="UPDATE ".PREFIX."listings SET expiration='".$expiration ." ". $time ."' WHERE ";
    }
    
    This is untested but should point you in the right direction.
  3. hel68c Customer

    Thanks Eric,

    I appreciate.

Share This Page