Error after purchase and install GC Enterprise in CI4

Error

Class ‘GroceryCrud\Core\GroceryCrud’ not found

appears when calling the customers method of example controller

I followed correctly the instalation instructions ,help

Hello @jloliva1984 ,

Can you please give us more info about the issue that you have because I can’t reproduce it?

What Grocery CRUD Enterprise version do you use? If you used the version 2 then following the instructions here: Codeigniter 4 Installation | Grocery CRUD make sure that you also have this line at the top of your controller:

<?php namespace App\Controllers;

include(APPPATH . 'Libraries/GroceryCrudEnterprise/autoload.php');

I strongly recommend, since this is the first time you are using Grocery CRUD Enterprise to install version 3 since it has a wizard that can help you step by step of how to install it. You can see the wizard here: User's Page Login

If you are still having issues please do let me know.

Regards
Johnny

i followed the installation steps with 3.0.1 version and it did not work out ,i followed the same steps with previous 2,x version and it worked ,by the way ,how can i change the modal-header background color for modals in GC?

Hello @jloliva1984 ,

Since I can’t reproduce the issue that you have can you please help me understand which steps, you did follow?

For example I guess the answer about Are you using any PHP framework? was “Yes. I am using Codeigniter version 4.” but what about the other 2?

More specifically:

  1. Are you using Composer?
  2. Do you have an existing project that you will install the library?

For the modal header, I guess by having a simple CSS change will do the work for you. For example:

.modal .modal-header {
    background: #FF0000;
    color: #FFFFFF;
}

If the change doesn’t work for you try adding the !important to your CSS. For example:

.modal .modal-header {
    background: #FF0000 !important;
    color: #FFFFFF !important;
}

Regards
Johnny

thanks Johny ,I used GC some years ago and a lot of things had changed ,in previos projects i could put new columns on the grid for putting icons for certain action for the user Ej view apartmants on a buildings grid ,now I am facing the error that the apartment field is not found ir building table ,and of course it is that way ,how could I do this? , thanks for your time

Hello @jloliva1984 ,

So the first issue with the error

Class 'GroceryCrud\Core\GroceryCrud' not found

was solved right?

If so then I am not sure about the issue that you have currently. Can you please share the error that you are getting and maybe a screenshot with what you are trying to achive?

Regards
Johnny

Hi. I am in the same page, 2025. Can’t make Enterprise work. This line include(APPPATH . ‘Libraries/GroceryCrudEnterprise/autoload.php’); didnt solve the problem, in fact that library is not there in my local installation, its in Librarioes/GroceryCrudEnterprise/libraries. Even changing that didnt solve the problem…

Hello @jgct_70 ,

If you are using the installation without composer then you should copy all the files from libraries to app/Libraries/GroceryCrudEnterprise. So your folder structure will look like this:

├── app
│   ├── Libraries
│       └── GroceryCrudEnterprise  
│               ├── autoload.php
│               ├── composer
│               ├── grocery-crud
│               ├── laminas
│               ├── scoumbourdis
│               └── vlucas

If you have done that and it is still not working, what is the error that you are getting? Is the autoload.php there and loading?

Regards
Johnny

Thanks for answering, but I’m done. After 72hs trying everything overn and over, had no success and nothing seems to help. I sent a of suggestions in wizard steps, regarding instructions that seem not clear to me. Also informed a lot of errors i get using composer.

Hello @jgct_70 ,

I am really sorry to hear that :frowning:

I have your suggestions and I will try to improve the wizard in the future. I have sent you an email with the zip file with Grocery CRUD and Enterprise included so you can have a last try. No composer, just really unzipping the file and follow the instructions at the email.

Let me know if that will work for you.

Regards
Johnny