Hello Ofi Khan,
Thank you for your detailed explanation. Your response helped clarify the override possibilities for the EasyStore component. I would like to confirm a few points based on our customization needs:
Custom Data in Database Tables:
We are adding a custom_data column to both the custom_cart and orders tables to store customized product data. However, we are concerned about whether these additional columns would be removed or altered during an EasyStore plugin update. Can you confirm if database schema changes (like adding custom columns) are preserved after updates?
File Overrides:
We updated the following view files for our customizations:
components/com_easystore/layouts/cart/mini.php
components/com_easystore/layouts/order/products.php
components/com_easystore/layouts/checkout/summary.php
components/com_easystore/tmpl/cart/default.php
administrator/components/com_easystore/tmpl/products/default.php
administrator/components/com_easystore/tmpl/order/edit.php
components/com_easystore/layouts/addtocart.php
Based on your reply, it seems we can override these files using Joomla's override system. For example:
components/com_easystore/tmpl/cart/default.php → templates/template_name/html/com_easystore/cart/default.php
components/com_easystore/layouts/checkout/summary.php → templates/template_name/html/layouts/com_easystore/checkout/summary.php
Could you confirm if this approach applies to all the listed view files?
Controller and Model Changes:
We modified the following controller and model files for our customizations:
components/com_easystore/src/Controller/CartController.php
components/com_easystore/src/Controller/OrderController.php
components/com_easystore/src/Controller/PaymentController.php
components/com_easystore/src/Model/CartModel.php
components/com_easystore/src/Model/OrderModel.php
components/com_easystore/src/Traits/Cart.php
administrator/components/com_easystore/src/Model/ProductsModel.php
Since you mentioned that controllers cannot currently be overridden, we understand these files would need to be replaced manually after every update. Do you have any suggestions for minimizing the effort required to reapply these changes?
Database Installation Script:
We updated administrator/components/com_easystore/sql/install.mysql.utf8.sql to include the custom_data column. Will this file be overwritten during plugin updates, and if so, how can we handle these database changes in a safe and future-proof manner?
Form XML Changes:
We also made changes to administrator/components/com_easystore/forms/product.xml to add custom fields for products. Does this file get replaced during plugin updates?
Email Templates:
We customized the following email-related files:
administrator/components/com_easystore/src/Email/EmailManager.php
administrator/components/com_easystore/src/Email/EmailService.php
administrator/components/com_easystore/src/Email/EmailServiceInterface.php
components/com_easystore/layouts/emails/order/summary.php
Is there any recommended way to handle these customizations, or do they also need to be reapplied after every update?
We would appreciate your insights to ensure our customizations are implemented in a sustainable way without heavily impacting future updates. Thank you again for your support!
Best regards,
Amvimedia