need to add new field in osclass table

4.2k views Asked by At

I am working on osclass project and am stuck on one problem from last week.

I have modified oc_t_item table and added a new field called bool b_show_contactnumber.

I have added the following code in ItemActions.php

'b_show_contactnumber'  => $aItem['showcontactNumber'],

$aItem['showcontactNumber']  = (Params::getParam('showcontactNumber') != '') ? 1 : 0;

Its not working; the item is not saving.

I have checked the value of $aItem['showcontactNumber'] in the other field and value is passing.

How can I make it work?

Thanks

1

There are 1 answers

2
Carlos Garcia de Marina On BEST ANSWER

First option is adding a 'Custom Field', at admin panel you can insert 'Custom Fields' like a radio buttons (SHOW CONTACT NUMB/ NO SHOW CONTACT NUMB).

Or you can try to develop a plugin, a little guide here http://wiki.osclass.org/How_to_extend_fields.

During the develop you can activate debugging adding some defines at config.php file , Developer section you can find Debug PHP errors & Debug SQL queries

If you can avoid modify the core files, you can continue updating osclass without problems.