Jump to content

Override error


Recommended Posts

Parse error: syntax error, unexpected '$product' (T_VARIABLE), expecting function (T_FUNCTION) in /home/allsuper/public_html/override/classes/FrontController.php on line 31

Got this error after clearing smarty and autoload cache. 10 minutes after moving my PS to a new server.

 

-Disabling overrides in BO fixes this issue.

-It might be server configuration and chmod

 

Any suggestions?

 

Check the error here;

www.allsupermoto.no

Link to comment
Share on other sites

can you post the code here please (use the  <>) in menu bar for best results

<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2011 PrestaShop SA
*  @version  Release: $Revision: 1.4 $
*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/

class FrontController extends FrontControllerCore
{

		$product = new Product($_GET['id_product'], false, intval($cookie->id_lang));
    if (Validate::isLoadedObject($product))
        self::$smarty->assign('product', $product);

    $images = $product->getImages(intval($cookie->id_lang));
    foreach ($images AS $k => $image)
        if ($image['cover'])
        {
            $cover = $image;
            $cover['id_image'] = intval($product->id).'-'.$cover['id_image'];
            $cover['id_image_only'] = intval($image['id_image']);
        }
        if (!isset($cover))
        $cover = array('id_image' => Language::getIsoById($cookie->id_lang).'-default', 'legend' => 'No picture', 'title' => 'No picture');
    self::$smarty->assign('cover', $cover);
	}
}
?>
Link to comment
Share on other sites

This override is for a 1.4 shop...

 

looks like it's for product cover image by language. 

did you load a module for product cover image by language?  Is so and you  can find the module...I'd uninstall it

 

you can also delete the override until you get this resolved (i.e. wrong code version)

Link to comment
Share on other sites

This override is for a 1.4 shop...

 

looks like it's for product cover image by language. 

did you load a module for product cover image by language?  Is so and you  can find the module...I'd uninstall it

 

you can also delete the override until you get this resolved (i.e. wrong code version)

 

So weird, as it worked perfectly before I moved all files to a new server.

I'm gonna take a look trough my modules and see if I find one that might have changed it. I don't believe I will though.

 

Edit: I found the last module I installed a month ago. A module that changes currency and language depending on location of the customer who enters, it might be that one?

 

Anywho, do you have the frontcontroller.php for 1.5.6?

Edited by Festuz (see edit history)
Link to comment
Share on other sites

uninstall the detection module for 1.4...there might be an upgrade for 1.5...I think this is a presto-changeo module.

 

you do not need the file, this is an override.

 

I did, and it didn't work.

I also disabled all non-prestashop modules, still didn't work.

Link to comment
Share on other sites

×
×
  • Create New...