Scssc not found error in OpenCart

If you are getting error like the one mentioned below when you attempted to clear cache, it is mostly because the storage folder location is not setup properly. Fatal error: Uncaught Error: Class ‘Scssc’ not found in /home/www/estore.mydomain.com/admin/controller/startup/sass.php:9 Stack trace: #0 /home/www/estore.mydomain.com/system/engine/action.php(79): ControllerStartupSass->index() Solution Edit the config.php and admin/config.php Update the storage directory location to the […]

OCMOD modification is not working in OpenCart 3.0.3.6

There is a bug in OpenCart 3.0.3.6 where the OCMOD modification is partially working or not working at all. To fix this issue, you need to access the file system/modification.xml Edit the file and copy-paste code as mentioned below or you can get the code from https://github.com/opencart/opencart/blob/3.0.x.x_Maintenance/upload/system/modification.xml After editing and saving the updated changes, click […]

How to find Fatal Error / Error 500 / Server error in opencart

To find what is causing the error 500/ internal server error / this page isn’t working, try the following The issue could be related to htaccess file or some broken code in the program Try adding this code to your index.php file, just after the opening php tag <?php ini_set(‘display_errors’, 1);ini_set(‘display_startup_errors’, 1);error_reporting(E_ALL); Now you should […]

Passing decoded Cyrillic Characters in json_encode

To decode the encoded cyrillic characters like \u041D in an array and to pass it to json_encode, follow the below technique json_encode($array, JSON_UNESCAPED_UNICODE); or $json = defined(‘JSON_UNESCAPED_UNICODE’) ? json_encode($array, JSON_UNESCAPED_UNICODE) : json_encode($str); or if PHP 5.4 and below preg_replace_callback(‘/\\\u([01-9a-fA-F]{4})/’, ‘prepareUTF8’, json_encode($array))