Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Jan 14, 2026

Motivation

  • Enable merchants to customize the product modal trigger per product by using a button image or custom label instead of the default trigger.
  • Ensure the module self-heals databases by adding checks for the newly introduced modal button columns so upgrades/installations add missing fields automatically.

Description

  • Add persistent fields for the per-product trigger by introducing button_file and button_label columns in sql/install.php and model properties in models/EverblockModal.php with multilingual support via button_label.
  • Extend the admin product UI in views/templates/admin/productModal.tpl to accept a Button label and a Button file with preview and delete controls, and expose related Smarty variables from the module backend.
  • Refactor the admin uploader script views/js/product-modal.js to support two upload targets (modal and button) and send a target parameter for uploads/deletes.
  • Update backend handlers in everblock.php to accept the target parameter in ajaxProcessProductModalFile, handle upload/delete for both file and button_file, and persist transfer payloads from product save logic (including deletion handling and file cleanup).
  • Render the custom trigger in the front office via views/templates/hook/modal.tpl to show an image (with views/css/everblock.css styles) when button_file exists or fallback to button_label text, preserving existing modal behavior.
  • Add schema self-heal checks in src/Service/EverblockTools.php::checkAndFixDatabase() to add missing button_file to everblock_modal and button_label to everblock_modal_lang when needed.

Testing

  • No automated tests were executed for these changes.

Codex Task

@CySSoO CySSoO merged commit ac1349c into master Jan 14, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants