OpenCart + Meta API Rescue: stabilization of the messaging module.
How I translated an unstable module from temporary cache to MySQL, analyzed Meta Webhooks, and helped the client separate code bugs from issues with tokens, permissions, and Facebook Business settings. OpenCart + Meta API Rescue: recovery of the Facebook/Instagram messaging module.
The client approached with the task to "fix 5 issues" in the OpenCart module that received comments and messages from Facebook/Instagram via Webhooks. In practice, the task turned out to be not a cosmetic bug fix, but an architectural problem: part of the data lived in temporary cache, statuses were not reliably recorded, and after clearing the cache, the operator could lose the working history of messages.
I conducted an audit of the OpenCart → SAP module → Facebook/Instagram Webhooks → cache → MySQL → admin interface connection and suggested not to fix the symptoms but to rebuild the foundation. The critical messaging logic was transferred from JSON files to MySQL so that dialogues, statuses, and history would not depend on the clearing of the OpenCart cache.
Additionally, I introduced a testing protocol based on real video of the client's workflow, set up diagnostic logs, helped separate code bugs from Meta API issues, and explained where the cause lies not in the module, but in permissions, tokens, and bindings of Facebook/Instagram accounts.
During the work, additional improvements were also implemented: live indication of new messages, sound notifications, and stable caching of avatars. As a result, the client received not just fixed buttons, but a more resilient architecture of the module and a clear technical roadmap for further development.
Stack: PHP, OpenCart, MySQL, JavaScript, Facebook Graph API, Instagram API, Webhooks, Meta Business, legacy refactoring.
The client approached with the task to "fix 5 issues" in the OpenCart module that received comments and messages from Facebook/Instagram via Webhooks. In practice, the task turned out to be not a cosmetic bug fix, but an architectural problem: part of the data lived in temporary cache, statuses were not reliably recorded, and after clearing the cache, the operator could lose the working history of messages.
I conducted an audit of the OpenCart → SAP module → Facebook/Instagram Webhooks → cache → MySQL → admin interface connection and suggested not to fix the symptoms but to rebuild the foundation. The critical messaging logic was transferred from JSON files to MySQL so that dialogues, statuses, and history would not depend on the clearing of the OpenCart cache.
Additionally, I introduced a testing protocol based on real video of the client's workflow, set up diagnostic logs, helped separate code bugs from Meta API issues, and explained where the cause lies not in the module, but in permissions, tokens, and bindings of Facebook/Instagram accounts.
During the work, additional improvements were also implemented: live indication of new messages, sound notifications, and stable caching of avatars. As a result, the client received not just fixed buttons, but a more resilient architecture of the module and a clear technical roadmap for further development.
Stack: PHP, OpenCart, MySQL, JavaScript, Facebook Graph API, Instagram API, Webhooks, Meta Business, legacy refactoring.