Search code examples
phpprestashopsmarty

Prestashop 1.6 - php into admin override tpl


Just wanted to include a custom php file into an override template I've made but when I use:

{php} include('custom_code.php'); {/php}

or:

{include_php file='../../../../../../panel/update.php'}

The page crashes. Prestashop is so hard to modify.


Solution

  • I have solved the issue creating a plugin for smarty in the directory

    /tools/smarty/plugins
    with the file name
    function.update_customer.php
    . then i pute the code in my template .tpl with this shortcode hook
    {update_customer}
    . Hope that helps in the future...