Per-product modal trigger: add button image/label support and DB self‑heal checks #768
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Description
button_fileandbutton_labelcolumns insql/install.phpand model properties inmodels/EverblockModal.phpwith multilingual support viabutton_label.views/templates/admin/productModal.tplto accept aButton labeland aButton filewith preview and delete controls, and expose related Smarty variables from the module backend.views/js/product-modal.jsto support two upload targets (modal and button) and send atargetparameter for uploads/deletes.everblock.phpto accept thetargetparameter inajaxProcessProductModalFile, handle upload/delete for bothfileandbutton_file, and persist transfer payloads from product save logic (including deletion handling and file cleanup).views/templates/hook/modal.tplto show an image (withviews/css/everblock.cssstyles) whenbutton_fileexists or fallback tobutton_labeltext, preserving existing modal behavior.src/Service/EverblockTools.php::checkAndFixDatabase()to add missingbutton_filetoeverblock_modalandbutton_labeltoeverblock_modal_langwhen needed.Testing
Codex Task