private function migratePayoutOptionFields() { echo " Migrating payout option fields....."; $selectBuilder = new Gpf_SqlBuilder_SelectBuilder(); $selectBuilder->select->add('*'); $selectBuilder->from->add('wd_pa_payoutfields'); $result = $selectBuilder->getAllRows(); $count = 0; foreach($result as $record) { $obj = new Gpf_Db_FormField(); $obj->setAccountId(Pap3Compatibility_Migration_Pap3Constants::DEFAULT_ACCOUNT_ID); $obj->setFormId('payout_option_'.$record->get('payoptid')); $obj->setCode($record->get('code')); $obj->setName($record->get('name')); $obj->setType(($record->get('rtype') == 1 ? 'T' : 'L')); $obj->setStatus(($record->get('mandatory') == 1 ? 'M' : 'O')); $obj->save(); $count++; } echo " ($count) ..... DONE<br/>"; }
private function insertEmptySignupField() { $this->countSignupFields++; $obj = new Gpf_Db_FormField(); $obj->setAccountId(Pap3Compatibility_Migration_Pap3Constants::DEFAULT_ACCOUNT_ID); $obj->setFormId('affiliateForm'); $obj->setCode('data'.$this->countSignupFields); $obj->setName('Unused'); $obj->setType('T'); $obj->setStatus('D'); $obj->save(); }