{"schema":"revdocs.ai.v1","entity":"revolution.custom_code","canonical":"https://rev.uask.pro/settings/custom-code.html#ai","document":"https://rev.uask.pro/settings/custom-code.html","anchors":{"doc":"#doc","dev":"#dev","ai":"#ai"},"verified":{"product":"Revolution","version":"5.x","platform":"OpenCart 3.x","scope":"stock distribution sources"},"instruction":["Read document#doc for user intent and document#dev for implementation evidence before planning a mutation.","Use this resource as the canonical operational context for revolution.custom_code only when the installed Revolution version is compatible with verified.version.","Separate facts from uncertainties; never convert an uncertainty into a fact.","Before any mutation apply safety.preconditions, preserve unrelated content, and require explicit authorization for production.","After mutation apply safety.postconditions and use diagnostics for failures.","Prefer evidence paths over assumptions; line numbers are hints for Revolution 5.x and may move in other versions."],"admin_path":["Настройки шаблона","Основные настройки","Свои стили и скрипты"],"fields":{"styles":{"form":"revtheme_footer_user_set[styles]","type":"string/raw_css","ui":"textarea rows=20","wrapper":"no <style>","scope":"global storefront CSS","flow":"POST -> html_entity_decode(ENT_QUOTES,UTF-8) -> append $tcss -> stylesheet_change.css"},"max_height":{"form":"revtheme_footer_user_set[max_height]","type":"enum string","values":{"0":"auto_js/max_height_div(); default","1":"generated_flexbox_css"}},"scripts":{"form":"revtheme_footer_user_set[scripts]","type":"trusted_html_fragment","ui":"textarea rows=20","wrapper":"executable JS requires <script>...</script>","scope":"all pages using Revolution footer","flow":"config group -> html_entity_decode(ENT_QUOTES,UTF-8) -> user_scripts -> raw footer Twig output"}},"cache":{"css_source":"catalog/view/theme/revolution/stylesheet/stylesheet_change.css","css_min_cache":"catalog/view/theme/revolution/stylesheet/stylesheet_min.css","rule":"when minification is enabled, rebuild/remove stale stylesheet_min.css through the normal cache workflow","scripts_in_js_min":false},"safety":{"risk":"high","preconditions":["confirm target environment","read and back up complete revtheme_footer_user_set","define one unique versioned marker block","do not transmit or store secrets"],"mutation":["change one independent block","preserve unrelated existing content","scope CSS to target component","make JS wrapped and idempotent","do not edit generated CSS as source of truth"],"postconditions":["expected marker present in output","no new console errors","desktop/mobile no unexpected overflow","menu, cart, forms and checkout still work"],"rollback":"remove only the versioned marker block; fallback restore the complete backed-up group","production":"mutation requires explicit user authorization"},"diagnostics":{"css_saved_absent":["find marker in stylesheet_change.css","check write permissions","invalidate theme/browser cache","rebuild stylesheet_min.css if enabled"],"css_present_inactive":["selector match","specificity/source order","media query","element state"],"js_rendered_text":["add <script> wrapper"],"js_not_running":["console syntax/reference errors","target existence","jQuery timing","DOM-ready/delegation"],"handler_duplicate":["duplicate output","namespace event","off before on"],"unequal_cards":["max_height value","dynamic content timing","reinitialize after slider/AJAX"]},"evidence":[["field UI/defaults","admin/view/template/revolution/revtheme.twig","9328-9357"],["CSS decode/append/flex","admin/controller/revolution/revstylesheet.php","293-295,314-320"],["scripts config/decode","system/revolution.ocmod.xml","6090-6091"],["user_scripts raw output","catalog/view/theme/revolution/template/common/footer.twig","775-777"]],"uncertainties":[{"item":"server-side save validation","reason":"primary settings controller is encoded","policy":"report as unverified; do not claim absent"}]}
