Hello EasyStore Community,
We are using the overrides and custom module concepts in our Joomla project to ensure our customizations persist after updating the EasyStore system. However, we have encountered challenges when working with JavaScript files, API calls, and model files.
Here are the specific files where changes have been made:
JavaScript Files:
media/com_easystore/js/product.site.js
media/com_easystore/js/cart.site.js
Model Files:
components/com_easystore/src/Model/OrdersModel.php
components/com_easystore/src/Model/OrderModel.php
components/com_easystore/src/Model/CartModel.php
Email Services:
administrator/components/com_easystore/src/Email/EmailManager.php
administrator/components/com_easystore/src/Email/EmailService.php
administrator/components/com_easystore/src/Email/EmailServiceInterface.php
We are aware of the standard override mechanism for templates and certain backend logic. However, overriding JavaScript files, API calls, and model logic seems more complex. Is there a recommended way to safely override these files to make them update-proof?
Specifically, we would like to know:
JavaScript Files: Is there a way to override the JavaScript files (product.site.js and cart.site.js) or hook into the API calls to avoid directly modifying the original files?
Model Files: Can model file logic (OrdersModel.php, OrderModel.php, CartModel.php) be extended or overridden like controllers? If not, what is the best practice to customize these files?
Email Services: For customizations in email logic (EmailManager, EmailService), how can we implement these changes in a maintainable and update-safe way?
Your guidance will help us adhere to best practices and reduce potential conflicts with future updates. Thank you for your support!