source/Application/Model/Actions.php
public function start()
    {
        $this->oxactions__oxactivefrom = new \OxidEsales\Eshop\Core\Field(date('Y-m-d H:i:s', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime()));
        if ($this->oxactions__oxactiveto->value && ($this->oxactions__oxactiveto->value != '0000-00-00 00:00:00')) {
            $iNow = \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime();
            $iTo = strtotime($this->oxactions__oxactiveto->value);
            if ($iNow > $iTo) {
                $this->oxactions__oxactiveto = new \OxidEsales\Eshop\Core\Field('0000-00-00 00:00:00');
            }
        }
        $this->save();
    }
public function start()
    {
        $this->oxactions__oxactivefrom = new \OxidEsales\Eshop\Core\Field(date('Y-m-d H:i:s', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime()));
        if ($this->oxactions__oxactiveto->value && ($this->oxactions__oxactiveto->value != '0000-00-00 00:00:00')) {
            $iNow = \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime();
            $iTo = strtotime($this->oxactions__oxactiveto->value);
            if ($iNow > $iTo) {
                $this->oxactions__oxactiveto = new \OxidEsales\Eshop\Core\Field('0000-00-00 00:00:00');
            }
        }
        $this->save();
    }
public function start ( ) { $ this -> oxactions__oxactivefrom = new \ OxidEsales \ Eshop \ Core \ Field ( date ( 'Y-m-d H:i:s' , \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsDate ( ) -> getTime ( ) ) ) ; if ( $ this -> oxactions__oxactiveto -> value && ( $ this -> oxactions__oxactiveto -> value != '0000-00-00 00:00:00' ) ) { $ iNow = \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsDate ( ) -> getTime ( ) ; $ iTo = strtotime ( $ this -> oxactions__oxactiveto -> value ) ; if ( $ iNow > $ iTo ) { $ this -> oxactions__oxactiveto = new \ OxidEsales \ Eshop \ Core \ Field ( '0000-00-00 00:00:00' ) ; } } $ this -> save ( ) ; }
start the promotion NOW!
start the promotion NOW!