Unexpected T_STRING, but where? : <p>I'm doing a module of prestashop (I posted other question yesterday). Now I'm having a problem with PHP, I think. Everytime it's says me that the line <code>if($same_puente === false OR $same_patilla === false)...</code> Parse error: syntax error, unexpected T_STRING in that line.</p>

<pre><code>&lt;?php

if (!defined('_PS_VERSION_'))
    exit;

class glassOptics extends Module
{
    /* @var boolean error */
    protected $_errors = false;

    /* @var boolean puente */
    public $same_puente = false;

    /* @var boolean patilla */
    public $same_patilla = false;

    /* @var boolean altura cristal */
    public $same_altura_cristal = false;

    /* @var boolean ancho cristal */
    public $same_ancho_cristal = false;

    public function __construct()
    {
        $this-&gt;name = 'glassOptics';
        $this-&gt;tab = 'front_office_features';
        $this-&gt;version = '1.0';
        $this-&gt;author = 'Víctor Martín';
        $this-&gt;need_instance = 0;

        parent::__construct();

        $this-&gt;displayName = $this-&gt;l('glassOptics');
        $this-&gt;description = $this-&gt;l('Módulo para Ópticas, de filtrado de gafas compatibles para cada cliente.');
    }

    public function install()
    {
        if (!parent::install() OR
            !$this-&gt;glopticasCustomerDB('add') OR
            !$this-&gt;glopticasProductDB('add') OR
            !$this-&gt;glopticasProductLangDB('modify') OR         
            !$this-&gt;registerHook('hookActionProductListOverride') OR            
            !$this-&gt;registerHook('DisplayAdminProductsExtra') OR            
            !$this-&gt;registerHook('ActionProductUpdate'))
            return false;
        return true;
    }

    public function uninstall()
    {
        if (!parent::uninstall() OR !$this-&gt;glopticasCustomerDB('remove') OR !$this-&gt;glopticasProductDB('remove'))
            return false;
        return true;
    }


    public function glopticasCustomerDB($method)
    {
        switch ($method) {
            case 'add': 

                $decimal_zero = '0.000000';
                $decimal_zero = mysql_real_escape_string($decimal_zero);

                $sql = 'CREATE TABLE IF EXISTS `'._DB_PREFIX_.'customer_optics_data` (
                `id_customer` int(10) UNSIGNED NOT NULL,
                `dioptrias_izquierdo` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.',
                `dioptrias_derecho` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.',
                `puente` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.',
                `patilla` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.',
                `altura_cristal` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.',
                `ancho_cristal` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.'
                ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8';

                break;

            case 'remove':
                $sql = 'DROP TABLE IF EXISTS `'._DB_PREFIX_ . 'customer_optics_data`';
                break;
        }

        if(!Db::getInstance()-&gt;Execute($sql))
            return false;
        return true;
    }

    public function glopticasProductDB($method)
    {
        switch ($method) {
            case 'add': 

                $decimal_zero = '0.000000';
                $decimal_zero = mysql_real_escape_string($decimal_zero);

                $sql = 'CREATE TABLE IF EXISTS `'._DB_PREFIX_.'product_optics_data` (
                `id_product` int(10) UNSIGNED NOT NULL,
                `dioptrias_izquierdo` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.',
                `dioptrias_derecho` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.',
                `puente` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.',
                `patilla` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.',
                `altura_cristal` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.',
                `ancho_cristal` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.'
                ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8';

                break;

            case 'remove':
                $sql = 'DROP TABLE IF EXISTS `'._DB_PREFIX_ . 'product_optics_data`';
                break;
        }

        if(!Db::getInstance()-&gt;Execute($sql))
            return false;
        return true;
    }


    public function glopticasProductLangDB($method)
    {
        switch ($method) {
            case 'modify':  

                $decimal_zero = '0.000000';
                $decimal_zero = mysql_real_escape_string($decimal_zero);

                $sql = 'ALTER TABLE ' . _DB_PREFIX_ . 'product_lang '
                .'ADD `dioptrias_izquierdo` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.','
                .'ADD `dioptrias_derecho` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.','
                .'ADD `puente` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.','
                .'ADD `patilla` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.','
                .'ADD `altura_cristal` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.','
                .'ADD `ancho_cristal` decimal(20,6) NOT NULL DEFAULT '.$decimal_zero.''
                .') ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8';

                break;

        }

        if(!Db::getInstance()-&gt;Execute($sql))
            return false;
        return true;
    }

    public function hookActionProductListOverride($params)
    {
        $customer_settings = glassOpticsHelperClass::getCustomerSettings($this-&gt;context-&gt;customer);

        if (!is_null($customer_settings)) {
            // Inform the hook was executed
            $params['hookExecuted'] = true;

            // Filter products here, you are now overriding the default
            // functionality of CategoryController class.
            // You can see blocklayered module for more details.

            if ((isset($this-&gt;context-&gt;controller-&gt;display_column_left) &amp;&amp; !$this-&gt;context-&gt;controller-&gt;display_column_left)
            &amp;&amp; (isset($this-&gt;context-&gt;controller-&gt;display_column_right) &amp;&amp; !$this-&gt;context-&gt;controller-&gt;display_column_right))
            return false;

            global $smarty;
            if (!Configuration::getGlobalValue('PS_LAYERED_INDEXED'))
                return;

            $sql_cat = 'SELECT COUNT(*) FROM '._DB_PREFIX_.'layered_category WHERE id_category = '.(int)Tools::getValue('id_category', Tools::getValue('id_category_layered', Configuration::get('PS_HOME_CATEGORY'))).'
                AND id_shop = '.(int) Context::getContext()-&gt;shop-&gt;id;
            $categories_count = Db::getInstance()-&gt;getValue($sql_cat);

            if ($categories_count == 0)
                return;

            // List of product to overrride categoryController
            $params['catProducts'] = array();
            $selected_filters = $this-&gt;getSelectedFilters();
            $filter_block = $this-&gt;getFilterBlock($selected_filters);
            $title = '';

            if (is_array($filter_block['title_values']))
                foreach ($filter_block['title_values'] as $key =&gt; $val)
                    $title .= ' &gt; '.$key.' '.implode('/', $val);

            $smarty-&gt;assign('categoryNameComplement', $title);
            $this-&gt;getProducts($selected_filters, $params['catProducts'], $params['nbProducts'], $p, $n, $pages_nb, $start, $stop, $range);
            // Need a nofollow on the pagination links?
            $smarty-&gt;assign('no_follow', $filter_block['no_follow']);

            filterProductsByConditions($customer_settings, $params['nbProducts']);


        }
    }

    private static function filterProductsByConditions($customer_settings, $product_collection) {
        if(!is_null($product_collection)){

            foreach ($product_collection as $product){
                $product_settings = glassOpticsHelperClass::getProductSettings($product);

                if(!is_null($product_settings)){

                    if(!is_null($product_settings-&gt;puente) AND !is_null($customer_settings-&gt;puente)){
                        $same_puente = (($product_settings-&gt;puente == $customer_settings-&gt;puente) ? true : false);
                    }else{
                        $same_puente = false;
                    }

                    if(!is_null($product_settings-&gt;patilla) AND !is_null($customer_settings-&gt;patilla)){
                        $same_patilla = (($product_settings-&gt;patilla == $customer_settings-&gt;patilla) ? true : false);
                    }else{
                        $same_patilla = false;
                    }

                    if(!is_null($product_settings-&gt;altura_cristal) AND !is_null($customer_settings-&gt;altura_cristal)){
                        $same_altura_cristal = (($product_settings-&gt;altura_cristal == $customer_settings-&gt;altura_cristal) ? true : false);
                    }else{
                        $same_altura_cristal = false;
                    }

                    if(!is_null($product_settings-&gt;ancho_cristal) AND !is_null($customer_settings-&gt;ancho_cristal)){
                        $same_ancho_cristal = (($product_settings-&gt;ancho_cristal == $customer_settings-&gt;ancho_cristal) ? true : false);
                    }else{
                        $same_ancho_cristal = false;
                    }

                    if($same_puente === false OR $same_patilla === false){
                        unset($product_collection[$product]);
                    }
                }
            }
            return $product_collection;
        }else{
            return $product_collection;
        }
    }
}
</code></pre>

<p>What I'm doing wrong? Thank you.</p>
