Tag Archives: add

How add or save listing property works?

This is only for very advanced developers who want to change some core features! Not for regular users!
If you need paid customization services please send request here:
You should understand codeigniter MVC:  https://codeigniter.com/userguide2/overview/mvc.html

Also check some articles in knowledge base like: http://iwinter.com.hr/support/?p=1288

So usually estate_m.php (method save) and controller estate.php method edit

Basic field details are defined in:

Screenshot_2

affected fields here:

Screenshot_3

Saving process:

Screenshot_1

 

 

Add field / option manually via phpmyadmin

If you accidentally remove red locked option from the database and now you need it… Now can be added via phpMyAdmin only, SQL queries:

To add option:

INSERT INTO `option` (`id` ,`parent_id` ,`order` ,`type` ,`visible` ,`is_locked` ,`is_frontend` ,`is_hardlocked`
) VALUES ('4', '0', NULL , 'DROPDOWN', '1', '1', '1', '1')

To add translations for option:

INSERT INTO `option_lang` (`option_id`, `language_id`, `option`, `values`, `prefix`, `suffix`) VALUES
(4, 1, 'Purpose', 'Sale,Rent,Sale and Rent', NULL, ''),
(4, 2, 'Namjena', 'Prodaja,Najam,Prodaja i najam', NULL, '');

In this example we adding ID #4,  and 1,2 was languages ID.

Another example for translation with just one language:

INSERT INTO `option_lang` (`option_id`, `language_id`, `option`, `values`, `prefix`, `suffix`) VALUES
(8, 1, 'Short description', '', NULL, '');

In this example we adding ID #8,  and 1 was languages ID because now we have only one language.

By ID of course we mean original field ID which you need to restore.

example query for listing category in classified script:

Category have ID field 79, so based on guide add field with id 79 manually, type is TREE
example query:
INSERT INTO `option` (`id` ,`parent_id` ,`order` ,`type` ,`visible` ,`is_locked` ,`is_frontend` ,`is_hardlocked`
) VALUES ('79', '0', NULL , 'TREE', '1', '1', '1', '1')

To add translations for option:

INSERT INTO `option_lang` (`option_id`, `language_id`, `option`, `values`, `prefix`, `suffix`) VALUES
(79, 1, 'Listing Category', '', NULL, '');