yvesima Posted May 16, 2016 Share Posted May 16, 2016 (edited) HelloI'm in prestashop 1.6.11I'va an error notice in smarty footer.tpl [16-May-2016 12:46:36 Europe/Paris] PHP Notice: Undefined index: ecomm_prodid in /home/mysite/public_html/www_presta/cache/smarty/compile/5b/97/72/5b9772ab5f8facfc36ea0388ccbe76f4a3129d93.file.footer.tpl.php on line 120 [16-May-2016 12:46:36 Europe/Paris] PHP Notice: Trying to get property of non-object in /home/mysite/public_html/www_presta/cache/smarty/compile/5b/97/72/5b9772ab5f8facfc36ea0388ccbe76f4a3129d93.file.footer.tpl.php on line 120 [16-May-2016 12:46:36 Europe/Paris] PHP Notice: Undefined index: ecomm_totalvalue in /home/mysite/public_html/www_presta/cache/smarty/compile/5b/97/72/5b9772ab5f8facfc36ea0388ccbe76f4a3129d93.file.footer.tpl.php on line 124 [16-May-2016 12:46:36 Europe/Paris] PHP Notice: Trying to get property of non-object in /home/mysite/public_html/www_presta/cache/smarty/compile/5b/97/72/5b9772ab5f8facfc36ea0388ccbe76f4a3129d93.file.footer.tpl.php on line 124 These are the lines 120 to 124 Can you help me please Thanks <?php if ($_smarty_tpl->tpl_vars['controller_name']->value=='product'||$_smarty_tpl->tpl_vars['controller_name']->value=='order'||$_smarty_tpl->tpl_vars['controller_name']->value=='orderopc'||(isset($_smarty_tpl->tpl_vars['order_sent']->value)&&$_smarty_tpl->tpl_vars['order_sent']->value==false)) {?> ga('set','dimension1','<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['ecomm_prodid']->value, ENT_QUOTES, 'UTF-8', true);?> '); // REQUIRED Product ID value ga('set','dimension2','<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['ecomm_pagetype']->value, ENT_QUOTES, 'UTF-8', true);?> '); // Optional Page type value ga('set','dimension3','<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['ecomm_totalvalue']->value, ENT_QUOTES, 'UTF-8', true);?> '); // Optional Total value <?php }?> Edited May 16, 2016 by yvesima (see edit history) Link to comment Share on other sites More sharing options...
polosat Posted May 16, 2016 Share Posted May 16, 2016 Hello,Please show your footer.tpl code, it seems you just need to add a couple of checks of variables. Link to comment Share on other sites More sharing options...
yvesima Posted May 16, 2016 Author Share Posted May 16, 2016 (edited) Hi thanks for your reply This is the code Thanks again {* * 2007-2014 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2014 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {if !$content_only} </div><!-- #center_column --> {if isset($right_column_size) && !empty($right_column_size)} <div id="right_column" class="col-xs-12 col-sm-{$right_column_size|intval} column">{$HOOK_RIGHT_COLUMN}</div> {/if} </div><!-- .row --> </div><!-- #columns --> </div><!-- .columns-container --> <!-- Footer --> <div class="footer-container"> <footer id="footer" class="container"> <div class="row">{$HOOK_FOOTER}</div> </footer> </div><!-- #footer --> </div><!-- #page --> {/if} {include file="$tpl_dir./global.tpl"} </body> </html> fosmarty-footer.tpl.php Edited May 16, 2016 by yvesima (see edit history) Link to comment Share on other sites More sharing options...
polosat Posted May 16, 2016 Share Posted May 16, 2016 Ok... Seems that the problem code is located somewhere in the Google Analytics module. Maybe you did some changes recently?By the way, if you just want to hide these notices, you can turn off error displaying and don't search the main reason (although of course will be better to find the problem ) Link to comment Share on other sites More sharing options...
yvesima Posted May 16, 2016 Author Share Posted May 16, 2016 Hello thanks for your quick reply i don't see the notice cause tehy are redirect on error_log, but i should like it to be clean I'll try with google module and i go back to you if i find So THANKS again Link to comment Share on other sites More sharing options...
yvesima Posted May 17, 2016 Author Share Posted May 17, 2016 Hi i've verified my error_log this error arrived just after installation of the module Premium Google Analytics Enhaced Ecommerce bought to PrestaShop THANKS Link to comment Share on other sites More sharing options...
polosat Posted May 17, 2016 Share Posted May 17, 2016 Oh, I see. Then you can just ask developer to fix that little issue. Also you can fix it yourself: the problem file is /modules/plpganalytics/views/templates/hook/footer.tplCopy that file to /themes/your_theme/modules/plpganalytics/views/templates/hook/footer.tpl and edit it.You need to add isset() checks for those variables. Post a code from that file here if you need any help:) 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