Now supports mysql, mysqli, mpdo, postgre & mssql.
Here is a VQMOD XML file that you can use to trace OpenCart functions to see exactly the order of the calls so that you can narrow down any problematic issues.
It also monitors and logs any SQL calls using the mysqli.php file to the same log file with a back trace on which routines called it.
The location and file name of the log file that is written to is /system/storage/logs/RSSQLData.txt in your OpenCart folder.
If it does not exist it will be automatically created and all subsequent calls to the log file the data will be appended to it.
After installing the VQMOD XML file all you need to do it run your OpenCart app and the log file will be created in real time.
Best when used with VQMOD for OpenCart (https://github.com/vqmod/vqmod/releases) and VQMOD Manager (http://www.opencart.com/index.php?route=extension/extension/info&extension_id=19188)
This tool along with Firefox & Firephp has helped me narrow down and solve a lot of issues in OpenCart.
When you are finished with the tool just uninstall it or remove the XML file from the VQMOD XML folder. No physical changes are made to your OpenCart files.
Will work with any version of Opencart that supports VQMOD. This was developed with VQMOD 2.5.1 (https://github.com/vqmod/vqmod/releases). This tool uses the mysqli.php to monitor database calls.
Sample view of the RSSQLData.txt file:
Method: ModelDesignLayout::getLayout()
File: /home/content/57/10005557/html/opencarttest/vqmod/vqcache/vq2-system_library_db.php Func: LogFuncCalls Line: 16
File: /home/content/57/10005557/html/opencarttest/vqmod/vqcache/vq2-catalog_model_design_layout.php Func: LogCall Line: 4
File: /home/content/57/10005557/html/opencarttest/vqmod/vqcache/vq2-catalog_controller_common_column_right.php Func: getLayout Line: 46
File: /home/content/57/10005557/html/opencarttest/vqmod/vqcache/vq2-system_engine_loader.php Func: call_user_func Line: 42
File: /home/content/57/10005557/html/opencarttest/catalog/controller/common/home.php Func: controller Line: 13
File: /home/content/57/10005557/html/opencarttest/vqmod/vqcache/vq2-system_engine_action.php Func: call_user_func Line: 46
File: /home/content/57/10005557/html/opencarttest/system/engine/front.php Func: execute Line: 34
File: /home/content/57/10005557/html/opencarttest/system/engine/front.php Func: execute Line: 29
File: /home/content/57/10005557/html/opencarttest/index.php Func: dispatch Line: 275
After extracting, upload the contents to the VQMOD folder of your OpenCart installation.
This module will trace all the php modules folders that are listed in the XML file and log them into the log file noted above.
the best way to use is to operate in OpenCart until you get to the location where you are just about to have a problem (or need a solution), then delete the log file (it will get automatically created again then continue until you have the problem. At this point download the log file, open in a text editor that understands lines with only line feeds. you can see what has happened and the order that it ha happened. You an always add/subtract new folder locations to/from the trace in the XML file.
Updated 03/01/2016 - v2.1.0.x DebugTrace.zip
Updated 03/14/2016 - v2.2.0.x DebugTrace.zip
If you like the work that we have done, please donate to make it possible for new work.
Donate with Credit Card (https://simplecheckout.authorize.net/payment/CatalogPayment.aspx)
Donate with PayPal (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3M92TBXENQ7RS)