get3code Posted March 10 Share Posted March 10 (edited) Hello, probably not many times someone was looking for a module that would add some css styles or javascript code directly to the template without ftp. It is an ideal solution for people who do not have access to ftp and want to make visual changes or add their own javascript code directly from the administration panel. The module I share is free. With this module, you can add your own CSS and JavaScript code from the PrestaShop admin backend. Just install the module and go to setup to add your code. The module uses the CodeMirror editor. two language versions EN/PL compatibility in version 1.6 / 1.7 / 8.0 two editor templates (light and dark) the module saves data in the database without creating additional files. # version 1.0.4 - added break line in codemirror # version 1.0.5 - fix for codemirror editor # version 1.0.6 - javascript support in footer and header, the ability to save data to the database or to a file # version 1.0.7 - additional field to set code editor height # version 1.0.8 - add axios for edit file and remove limit line # version 1.0.9 - add show and hide code area get3addons_1_0_9.zip Edited April 3 by get3code (see edit history) 2 1 Link to comment Share on other sites More sharing options...
DNK-LUIFER Posted March 10 Share Posted March 10 hace 9 horas, get3code dijo: Hello, probably not many times someone was looking for a module that would add some css styles or javascript code directly to the template without ftp. It is an ideal solution for people who do not have ftp access and want to make visual changes or add their own javascript code directly from the admin panel. The module I provide is free. With this module, you can add your own CSS and Javascript code from the PrestaShop admin backend. Just install the module and go to configuration to add your code. The module uses the CodeMirror editor. two language versions EN / PL compatibility on version 1.6 / 1.7 / 8.0 two editor templates (light and dark) the module saves data in the database without creating additional files. get3addons.zip 94.8 kB · 2 downloads Not work. Not load editor. PS 801 - PHP 8.1.16 Link to comment Share on other sites More sharing options...
get3code Posted March 11 Author Share Posted March 11 (edited) The module was tested on PrestaShop 8.0.1 and on php 8.0, 8.1, 8.2. However, I added one change in javascript. Check if it's ok. Edited March 11 by get3code (see edit history) Link to comment Share on other sites More sharing options...
DNK-LUIFER Posted March 11 Share Posted March 11 hace 23 minutos, get3code dijo: The module was tested on PrestaShop 8.0.1 and on php 8.0, 8.1, 8.2. However, I added one change in javascript. Check if it's ok. get3addons.zip 94.78 kB · 0 downloads No. Editing the "path" I have managed to load the box to enter the code. I continue to investigate. Many thanks. Link to comment Share on other sites More sharing options...
get3code Posted March 11 Author Share Posted March 11 (edited) Try this. I removed configuration detection. I tested on 4 different servers with 4 different versions of PHP and Prestashop. It works on everyone. Check if you have an F12 debugger chrome conflict. The editor loads from the javascript library. If a module generates an error in the prestashop backend, the library may fail to load. That's why it's good to check the debugger for errors in the console.I will add a text editor without loading javascript in the next version of the module. Edited March 11 by get3code (see edit history) Link to comment Share on other sites More sharing options...
get3code Posted March 11 Author Share Posted March 11 Especially for you, I added a text code editor. if you have problems with javascript in the backend. Version 1.0.3 is already with this addition. Link to comment Share on other sites More sharing options...
DNK-LUIFER Posted March 11 Share Posted March 11 hace 5 minutos, get3code dijo: Especially for you, I added a text code editor. if you have problems with javascript in the backend. Version 1.0.3 is already with this addition. Many thanks. It's strange, I have CodeMirror working with javascript loaded perfectly in other stores. I don't have any problem with backoffice debugging on js load. By the way, with the size of the edit box it is impossible to work. Thank you. Link to comment Share on other sites More sharing options...
get3code Posted March 11 Author Share Posted March 11 Additional options can be added in the codemirror editor. Just add line breaks. I added this to version 1.0.4. Try with this version. lineWrapping: true, lineWrapping: true, Link to comment Share on other sites More sharing options...
dresiosue Posted March 23 Share Posted March 23 I was searching hard for a css editor like this BUT with the text form bigger. All that I've seen its the same, 200 or 300px height for the text form. Link to comment Share on other sites More sharing options...
get3code Posted March 23 Author Share Posted March 23 Hi, I will add today the ability to set your editor height. Link to comment Share on other sites More sharing options...
get3code Posted March 23 Author Share Posted March 23 I added an additional field to change the height. It is in version 1.0.7 Link to comment Share on other sites More sharing options...
dresiosue Posted March 23 Share Posted March 23 8 hours ago, get3code said: I added an additional field to change the height. It is in version 1.0.7 Thank you! That's exactly what i was looking for. Now it will be my most used module! Two things: 1. Can the google code be put in the javascript header? 2. Maybe you can put a 'close tab' in the settings of the module, so the first thing we see when entering the module is the CSS tab. This would be a little nicer for those of us who have long lines of code and change all the time. again Thank you! Link to comment Share on other sites More sharing options...
get3code Posted March 23 Author Share Posted March 23 13 minutes ago, dresiosue said: Thank you! That's exactly what i was looking for. Now it will be my most used module! Two things: 1. Can the google code be put in the javascript header? 2. Maybe you can put a 'close tab' in the settings of the module, so the first thing we see when entering the module is the CSS tab. This would be a little nicer for those of us who have long lines of code and change all the time. again Thank you! 1. Yes you can put javascript code without script tags2. I will add this functionality in the next version of the module Link to comment Share on other sites More sharing options...
dresiosue Posted March 23 Share Posted March 23 3 minutes ago, get3code said: 1. Yes you can put javascript code without script tags2. I will add this functionality in the next version of the module The module cuts my code at line 273. I just lost 700 lines of code for not backing up properly before pasting code from one module to another Example my entire code is 1000 lines, but when I put save buttom the code cuts at line 273. Link to comment Share on other sites More sharing options...
get3code Posted March 23 Author Share Posted March 23 If you have checked to load from database then there is a character limit in the database. You must have this option turned off. Link to comment Share on other sites More sharing options...
get3code Posted March 23 Author Share Posted March 23 I'll post the data chunking fix soon 1 Link to comment Share on other sites More sharing options...
dresiosue Posted March 23 Share Posted March 23 2 minutes ago, get3code said: If you have checked to load from database then there is a character limit in the database. You must have this option turned off. I have not activated. But still when I put more than 273 and choose "save" the code cuts at that line Link to comment Share on other sites More sharing options...
get3code Posted March 23 Author Share Posted March 23 Ok, I changed the module. Unfortunately, prestashop has character limits. I had to add ajax to save data to files on an ongoing basis. In the near future I will add additional functionalities such as hiding elements. Current version with ajax - 1.0.8 Link to comment Share on other sites More sharing options...
dresiosue Posted March 23 Share Posted March 23 5 minutes ago, get3code said: Ok, I changed the module. Unfortunately, prestashop has character limits. I had to add ajax to save data to files on an ongoing basis. In the near future I will add additional functionalities such as hiding elements. Current version with ajax - 1.0.8 Thanks, I was able to recover the lost code, I'll try the new version and let you know Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now