If logs folder don't show error file :
Go to config.php edit :
----------------------------------
To modify url login to admin-login :
----------------------------------
Edit CSS at :
application/views/themes/defaults/assets_web/css/style.css but better edit in custom.css because when update version, style.css will be replaced by new file.

Edit languages at :
database table language

Common.php file contain all common functions is at :
application/models/Hungry_model.php

Home page controller/Home.php is at :
application/controllers/Hungry.php

Edit header and footer is at :
application/views/themes/defaults/index.php

Syntac replacement :
$data['form_data']= $this->common->getAllRec("*","tbl_manage_announcement","WHERE status = 1 Order By id DESC");
$data['paymentinfo'] = $this->hungry_model->read_all('*', 'payment_method', 'payment_method_id', '', 'is_active', '1');

Exception: Call to a member function query() on null
Previous project code : $query=$this->CI->db->query($q);
Solution : Remove "CI"

How to call function from controller to view page?

----------------------------------
Admin header, sidebar, footer is at :
1) application/modules/template/views/includes/header.php
2) application/modules/template/views/layout.php
3) At Controllers/Xxx.php file replace :
----------------------------------
Admin sidebar is not active, go to application/modules/template/views/includes/sidebar.php :

----------------------------------
If css disappear, then go to contoller file edit :

----------------------------------
If admin-agent cannot login, go to admin panel > user > edit user > uncheck "Is Monitor Display".

If side bar menu is not show, then add in tbl_language.

If 500 error or Call to a member function getAllRec() on null, meaning cannot read Common.php file, so add the following code to the controller file :
----------------------------------
How to move Controller file from old project to new project?
1) Copy paste the following 4 functions from old projects Controller/Wallets.php to new project controller/Hungry.php :
a) function cash_wallet()
b) function cash_wallet_ajax()
c) function coin_wallet()
d) function coin_wallet_ajax()

2) add "public" before "function" at point (34) a,b,c,d.

3) find keyword "$this->session->userdata('WDW_MEMBER_LOGIN_ID')" and replace it with $islogin and add declaration : $islogin = $this->session->userdata('CusUserID');

4)
----------------------------------
How to move View file from old project to new project? 7 steps :
1) Copy paste entire code from old project file to new project file.
2) Delete all codes above the following code line :

----------------------------------
3) make sure close div is the same number as open div (tips : just count vertical line from left side). Delete all extra div close at bottom

4) Visit member site to find out which page is the same template u want to copy (want side menu?), if want side menu then may copy my_profile page template. Copy all div class from there.

5) Find keyword "member/" and replace it with correct file path, eg :
6) application/config/routes.php add :
7) include datatable css and javascript to application/modules/template/views/includes/head.php :
----------------------------------
TypeError: $(...).DataTable is not a function , solution :
There could be 3 reasons for this error :
1) jQuery DataTables library is missing.
2) jQuery library is loaded after jQuery DataTables.
3) Multiple versions of jQuery library is loaded.
SOLUTION at point (7) above.

Those errors are because you didn't include inc_footer.php :
1) checkboxlist_all_new error
2) status active inactive toogle error
3) change_status error
4) delete_all error

----------------------------------
Cannot upload photo / payment resit
OR
error --> Exception: Call to a member function initialize()
Solution is to load "upload" library at Config/autoload.php OR put the following code on the error page :
$this->load->library('upload');

can't submit form on bootstrap popup model, so must use javascript to submit form:
----------------------------------
How to copy paste library/Common_model.php from old project to new project?
Solution : copy the inside codes functions from old Common_model.php to new Hungry_model.php

Error :
1) 500
2) Unable to load the requested file: member/inc_footer.php
3) The path to the image is not correct.
4) Your server does not support the GD function required to process this type of image.
Solution :
----------------------------------
How to apply jquery function from old project form to new project form?
----------------------------------
500 ERROR might because database query syntac error, or wrong field name in database.

Cannot find jquery function or javascript function is from which .js file?
Solution : right click the webpage, select "Page Source", then click each .js link to open it. Then press CTRL + F to find the keyword.

javascript function addonsitem() and addtocartitem() is at application/views/themes/defaults/assets_web/js/default_theme.js

ERRORS :
----------------------------------
$this->session->set_flashdata not showing. Solution : Add the following code inside div id="content"
----------------------------------
Book table check available codes at : application/models/Hungry_model.php
function checkavailtable()

table reservation flow :
reservation-2.php > hungry/reservation > hungry/checkavailablity > checkavail.php > default_theme.js/editreserveinfo() > hungry/reservationform > reservationform.php > hungry_model/checktable()/checkfree()/checkavailtable

Dont know which file to edit for Cart? cart->update() /cart->contents()?
cart is class of Codeignitor, so you won't fine cart function. All variable save in array pass through jquery. So you just need to trace from menu-2.php form > jquery call php function in Hungry.php > view form...

shopping cart function related files :
addonsitem.php
cartlist.php
cart-2.php
default_theme.js










Posted by Zac1987 on 27 August, 2021
| | edit post
Share On Facebook ! Share On Google Buzz ! Add To Del.icio.us ! Share On Digg ! Share On Reddit ! Share On LinkedIn ! Post To Blogger ! Share On StumbleUpon !
Share On Friend Feed ! Share On MySpace ! Share On Yahoo Buzz ! Share On Google Reader ! Google Bookmark ! Send An Email ! Blog Feed !

0 comments






Enter your email address:

Subscribe in a reader

Follow zac1987 on Twitter

Donation

If you feel my website is informative and it is useful for you, please donate some money to support me or buy me a drink. I will continues this good works. Thank you.