Could you provide an example of what you're trying to do, other than explaining the theory for instance? Your question may result countless solutions while all you may be looking for is a simple solution.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I am trying to develop a module which can do following things.
1. Will have an admin panel to set some variables
2. Will add a global script into every pages
3. Will generate a particular javascript on product/checkout pages based on the variables from backend.
Right now I successfully finished the dashboard part but I still can't figure out an API call to generate scripts into Open Cart's theme system.
1. Will have an admin panel to set some variables
2. Will add a global script into every pages
3. Will generate a particular javascript on product/checkout pages based on the variables from backend.
Right now I successfully finished the dashboard part but I still can't figure out an API call to generate scripts into Open Cart's theme system.
I would recommend the use of Ajax over PHP with JSON datatype rather than generic scripting from variables to form into JS. JSON datatype would avoid encountering XSS vulnerabilities.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
An addition with the help of this post: viewtopic.php?f=121&t=199903#p704402 , the .htaccess file can also help to prevent XSS vulnerabiltiies with:
Code: Select all
<IfModule mod_headers.c>
# Set XSS Protection header
Header set X-XSS-Protection "1; mode=block"
</IfModule>
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 8 guests