Hi, I'm doing a test... Osclass 3.2.2 ...
i've created at the database the column "s_contact_phone" (table oc_t_item of course) and in the ItemActions.php add the line 's_contact_phone' => '999888777', in the $this->manager->insert(array( to test if it works, but it didn't
, it insert nothing at the database, and in the oc_t_log all is ok, but fk_i_id is 0 (because, the insert before didn't work and it can't returned the ID).
This must work, and i don't know why don't
$this->manager->insert(array(
'fk_i_user_id' => $aItem['userId'],
'dt_pub_date' => date('Y-m-d H:i:s'),
'fk_i_category_id' => $aItem['catId'],
'i_price' => $aItem['price'],
'fk_c_currency_code' => $aItem['currency'],
's_contact_name' => $contactName,
's_contact_email' => $contactEmail,
's_contact_phone' => '999888777',
's_secret' => $code,
'b_active' => ($active=='ACTIVE'?1:0),
'b_enabled' => $enabled,
'b_show_email' => $aItem['showEmail'],
'b_spam' => $is_spam,
's_ip' => $aItem['s_ip']
));
any suggestions?
thanks.
PD: i've tried a second test...
After
$itemId = $this->manager->dao->insertedId();
without touching the $this->manager->insert(array(
I added
$aUpdate = array(
's_contact_phone' => '999888777'
);
$result = $this->manager->update( $aUpdate, array('pk_i_id' => $itemId,
's_secret' => $code ) );
Trying to update the register with the phone number... now the insert works, but the update didn't T_T