Jump to content

php fatal error - no code issues


andrzejdlugosz

Recommended Posts

Hello,

Everything working fine, there is no code issues in .tpl file. 

I have simple if statement with:

{if ($product->name)=='product1' || ($product->name)=='product2' }

<!-- some text here -->

{/if}

 

But for some reason when I add another option:

{if ($product->name)=='product1' || ($product->name)=='product2'  || ($product->name)=='product3' }

<!-- some text here -->

{/if}

 

I get below error. There is nothing wrong with coding. Maybe with file encoding? Could not find solution online. Could anyone help? Thanks for reading.

 

 

[22-May-2017 12:27:17 Europe/London] PHP Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home/gbs2/public_html/themes/autumn/product.tpl" on line 1 "{* * 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/license in /home/gbs2/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 667

Link to comment
Share on other sites

i think I have checked it all. File is encoded in UTF-8.

It is simple as: FILE WITHOUT PART below in if statement - no error, page loads fine. With PART below php fatal error mentioned before -page broken. Very frustrating.

 || ($product->name)=='product3'
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...