| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
[Debug Console] Switching easy between showing variables or files | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
[Debug Console] Switching easy between showing variables or files
Hi Guys,
By default in smarty.php $smarty->debug_tpl = "file:debug_templates.tpl";. Setting up this value means showing the template files in the Debugging Console. I would like to insert a check box in Admin before activating the Webmaster mode. When this box is checked to set up $smarty->debug_tpl = "file:debug.tpl";. This means to switch showing smarty variables instead of template files. Could anyone help?
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#2
|
|||||||
|
|||||||
Re: [Debug Console] Switching easy between showing variables or files
That's a great idea... instead of having to edit the file before every variable search - a checkbox! I am subscribing to this thread. Hope someone knows how to do this.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#3
|
|||||||||
|
|||||||||
Re: [Debug Console] Switching easy between showing variables or files
Download the attached debug_templates.tpl template.
Backup the existing one. Then upload the new one. That's all.
__________________
Eugene Kaznacheev, Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009) ex-Head of X-Cart Tech Support Department ex- X-Cart Hosting Manager - X-Cart hosting ex-X-Cart Technical Support Engineer Note: For the official guaranteed tech support services please turn to the Customers HelpDesk. |
|||||||||
|
#4
|
|||||||||
|
|||||||||
Re: [Debug Console] Switching easy between showing variables or files
Wow! Very good!
How can I make this window by default to show the variables not the files? P.S. This forum is a treasure with a lot of value people. Keep going!
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#5
|
|||||||||
|
|||||||||
Re: [Debug Console] Switching easy between showing variables or files
Edit the debug_templates.tpl file.
Replace this line: HTML Code:
with the: HTML Code:
__________________
Eugene Kaznacheev, Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009) ex-Head of X-Cart Tech Support Department ex- X-Cart Hosting Manager - X-Cart hosting ex-X-Cart Technical Support Engineer Note: For the official guaranteed tech support services please turn to the Customers HelpDesk. |
|||||||||
|
#6
|
|||||||||
|
|||||||||
Re: [Debug Console] Switching easy between showing variables or files
Works fine. Nice tip!
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#7
|
|||||||
|
|||||||
Re: [Debug Console] Switching easy between showing variables or files
I tried this on an old site running 4.1.9 and got the message:
Error: Smarty error: [in file:debug_templates.tpl line 10]: [plugin] modifier 'wm_remove' is not implemented (core.load_plugins.php, line 11 in C:\xampp\htdocs\mysite\Smarty-2.6.12\Smarty.class.php on line 1095
__________________
Linux. Apache. PHP 5.2 Site 1 - now xcart 4.4.1 DSEFU, AOM, RMA, Magnifier, Upsells. Heavy mods for Australian postcode validation and extra Aussie payment method. Site 2 - xcart 4.1.11, DSEFU Site 3 - xcart 4.2 Site 4 - xcart 4.3 |
|||||||
#8
|
|||||||||
|
|||||||||
Re: [Debug Console] Switching easy between showing variables or files
Open the template and delete all instances of "wm_remove"
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#9
|
|||||||
|
|||||||
Re: [Debug Console] Switching easy between showing variables or files
cflsystems, you're beautiful!
__________________
Linux. Apache. PHP 5.2 Site 1 - now xcart 4.4.1 DSEFU, AOM, RMA, Magnifier, Upsells. Heavy mods for Australian postcode validation and extra Aussie payment method. Site 2 - xcart 4.1.11, DSEFU Site 3 - xcart 4.2 Site 4 - xcart 4.3 |
|||||||
#10
|
|||||||
|
|||||||
Re: [Debug Console] Switching easy between showing variables or files
This was very helpful. Thank-you very much!
__________________
JK X-Cart version 4.7 We have about lots of add-on modules. |
|||||||
|
|||
X-Cart forums © 2001-2020
|