source/Application/Model/OrderFile.php
public function setFile($sFileName, $sFileId, $iMaxDownloadCounts, $iExpirationTime, $iExpirationDownloadTime)
    {
        $sNow = \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime();
        $sDate = date('Y-m-d G:i', $sNow + $iExpirationTime * 3600);

        $this->oxorderfiles__oxfileid = new \OxidEsales\Eshop\Core\Field($sFileId);
        $this->oxorderfiles__oxfilename = new \OxidEsales\Eshop\Core\Field($sFileName);
        $this->oxorderfiles__oxmaxdownloadcount = new \OxidEsales\Eshop\Core\Field($iMaxDownloadCounts);
        $this->oxorderfiles__oxlinkexpirationtime = new \OxidEsales\Eshop\Core\Field($iExpirationTime);
        $this->oxorderfiles__oxdownloadexpirationtime = new \OxidEsales\Eshop\Core\Field($iExpirationDownloadTime);
        $this->oxorderfiles__oxvaliduntil = new \OxidEsales\Eshop\Core\Field($sDate);
    }
public function setFile($sFileName, $sFileId, $iMaxDownloadCounts, $iExpirationTime, $iExpirationDownloadTime)
    {
        $sNow = \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime();
        $sDate = date('Y-m-d G:i', $sNow + $iExpirationTime * 3600);

        $this->oxorderfiles__oxfileid = new \OxidEsales\Eshop\Core\Field($sFileId);
        $this->oxorderfiles__oxfilename = new \OxidEsales\Eshop\Core\Field($sFileName);
        $this->oxorderfiles__oxmaxdownloadcount = new \OxidEsales\Eshop\Core\Field($iMaxDownloadCounts);
        $this->oxorderfiles__oxlinkexpirationtime = new \OxidEsales\Eshop\Core\Field($iExpirationTime);
        $this->oxorderfiles__oxdownloadexpirationtime = new \OxidEsales\Eshop\Core\Field($iExpirationDownloadTime);
        $this->oxorderfiles__oxvaliduntil = new \OxidEsales\Eshop\Core\Field($sDate);
    }
public function setFile ( $ sFileName , $ sFileId , $ iMaxDownloadCounts , $ iExpirationTime , $ iExpirationDownloadTime ) { $ sNow = \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsDate ( ) -> getTime ( ) ; $ sDate = date ( 'Y-m-d G:i' , $ sNow + $ iExpirationTime * 3600 ) ; $ this -> oxorderfiles__oxfileid = new \ OxidEsales \ Eshop \ Core \ Field ( $ sFileId ) ; $ this -> oxorderfiles__oxfilename = new \ OxidEsales \ Eshop \ Core \ Field ( $ sFileName ) ; $ this -> oxorderfiles__oxmaxdownloadcount = new \ OxidEsales \ Eshop \ Core \ Field ( $ iMaxDownloadCounts ) ; $ this -> oxorderfiles__oxlinkexpirationtime = new \ OxidEsales \ Eshop \ Core \ Field ( $ iExpirationTime ) ; $ this -> oxorderfiles__oxdownloadexpirationtime = new \ OxidEsales \ Eshop \ Core \ Field ( $ iExpirationDownloadTime ) ; $ this -> oxorderfiles__oxvaliduntil = new \ OxidEsales \ Eshop \ Core \ Field ( $ sDate ) ; }
Set file and download options

@param string $sFileName               file name
@param string $sFileId                 file id
@param int    $iMaxDownloadCounts      max download count
@param int    $iExpirationTime         main download time after order in times
@param int    $iExpirationDownloadTime download time after first download in hours
Set file and download options