vineri, 19 noiembrie 2010

The Ultimate Prestashop Module and Theme Development Tool

Posted by admin | Filed under Development Resources, Free Prestashop Modules

While stumbling around the internet as you do when pondering a particularly awkward programming challenge, I came across an excellent post on smarty debug with FireBug. This inspired me to pull together a Prestashop module to allow store owners, designers and developers to view indepth debugging data from right within the Prestashop environment.


I think most people working on Prestashop development projects have longed for an easy way of identifying which template variables are set on which page, and although this doesn’t tell you at which point in the page rendering process a variable may be available, it does give an important insight into how to leverage otherwise missed opportunities to enhance a site’s design and functionality, and catch errors.


All credit for the FireBug template has to go to the original author’s post at PHPhulp on Smarty Firebug debug.tpl.


You must install FireBug in your Firefox Browser to use this with the ‘Use FireBug’ module option enabled (default).


You can however disable FireBug support in the module and use the traditional javascript popup instead. Just enable debug in the module admin settings page and visit your front office page. Note that you may need to refresh your page for it to render correctly in this mode, and remember that every visitor to your site will see the popup!!

If you haven’t already, then install the FireBug Add-on to Firefox.Enable the Console in FireBug by clicking on the down arrow beside “Console” and selecting ‘Enable’.In the module settings enable the smarty debugging in Prestashop by ticking the ‘Debug’ option and clicking update.*At the FireBug console prompt (>>>) enter: Smarty_debug(); or Smarty_debug(true); (both case-sensitive) after each page load to display debug data.Enjoy viewing all you ever needed to know about your module or theme’s template internals!Disable the ‘Debug’ option in this module as soon as you are finished your debug session.

*Note: Using Smarty_debug(true); enables grouping so that some of the elements can be collapsed to improve readability.


You may also like: Writing your own PrestaShop Module – Part 1 So you want to write a module? Introduction There has...Writing your own Prestashop Module – Part 3 Storing Module Configuration Introduction In the third part of this...Writing your own Prestashop Module – Part 4 Form Validation and Security Introduction While being sufficiently functional for...Writing your own Prestashop Module – Part 2 Creating a basic module Introduction In this second part of...

Tags: design, development

Permalink for Article | January 6th, 2010


View the original article here


eBooks on the French Canals, Living Aboard Around the World, La Rochelle Guide Book


Check it out!

2 comentarii:

  1. The blog posted is very interesting from all aspects and it will surely benefit the readers by all means.
    Prestashop Theme Developer

    RăspundețiȘtergere