Jump to content

Smarty compile problems (Solved)


Recommended Posts

Prestashop version: 1.5.4.1
theme: Buddie theme (Codespot)
URL: in localhost yet.

Hi,

I encounter a problem, when i go to the product detail page, some Smarty errors appear:
 


[b]Notice[/b]: Undefined index: product in [b]C:\xampp\htdocs\hiperdog2\cache\smarty\compile\6b\72\13\6b7213d0d5f9e143c038344ec24d12757fb96446.file.producttab.tpl.php[/b] on line [b]26[/b]

[b]Notice[/b]: Trying to get property of non-object in [b]C:\xampp\htdocs\hiperdog2\cache\smarty\compile\6b\72\13\6b7213d0d5f9e143c038344ec24d12757fb96446.file.producttab.tpl.php[/b] on line [b]26[/b]

[b]Notice[/b]: Trying to get property of non-object in [b]C:\xampp\htdocs\hiperdog2\cache\smarty\compile\6b\72\13\6b7213d0d5f9e143c038344ec24d12757fb96446.file.producttab.tpl.php[/b] on line [b]26[/b]

[b]Notice[/b]: Undefined index: product in [b]C:\xampp\htdocs\hiperdog2\cache\smarty\compile\ae\53\ba\ae53ba5090957f6032910deff552d60ca942b194.file.producttabcontent.tpl.php[/b] on line [b]27[/b]

[b]Notice[/b]: Trying to get property of non-object in [b]C:\xampp\htdocs\hiperdog2\cache\smarty\compile\ae\53\ba\ae53ba5090957f6032910deff552d60ca942b194.file.producttabcontent.tpl.php[/b] on line [b]27[/b]

[b]Notice[/b]: Trying to get property of non-object in [b]C:\xampp\htdocs\hiperdog2\cache\smarty\compile\ae\53\ba\ae53ba5090957f6032910deff552d60ca942b194.file.producttabcontent.tpl.php[/b] on line [b]27[/b]



I've tried delete files (except index.php) from folder /cache/smarty/cache and /cache/smarty/compile of project. I've deleted cache from navigator. I've changed permissions project folders. I've changed configuration in Prestashop backoffice of compiler Smarty . I not Know to do more.
Can you help me?

 

post-658477-0-63876300-1377765472_thumb.jpg

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

I can show you the file php and tpl related with error.

 

PHP file

<?php
if (!defined('_PS_VERSION_'))
exit;
class CsAboutManufacture extends Module
{
function __construct()
   {
    $this->name = 'csaboutmanufacture';
    $this->tab = 'mymodule';
    $this->version = 1.0;
 $this->author = 'Codespot';

    parent::__construct();

 $this->displayName = $this->l('Tab manufacturer');
    $this->description = $this->l('Displays a tab about of manufacturers on the product page');
   }
function install()
   {
    return (parent::install() AND $this->registerHook('productTab') AND $this->registerHook('productTabContent'));
   }

public function hookProductTab()
{
 return $this->display(__FILE__, 'producttab.tpl');
}
public function hookProductTabContent()
{
 if (isset($_GET['id_product']))
 {
  $pro = new Product($_GET['id_product']);
  $manu = new Manufacturer ($pro->id_manufacturer);
  $manu_des = $manu->description[(int)Context::getContext()->language->id];
  $this->smarty->assign(array('manu_des' => $manu_des));
  return $this->display(__FILE__, 'producttabcontent.tpl');
 }

}

}
?>

 

TPL File

{if $product->id_manufacturer && isset($product->id_manufacturer)}
<div id="idTab_manu" class="rte">
 {$manu_des}
</div>
{/if}

Link to comment
Share on other sites

Hi vekia,

 

I tried to find any code like @ini_set or ini_set, in the  themeinstallator module, the same of the file that i showed in the last post.

I found a line with content @ ini_set, but not to do with it.

public function __construct()
	{
		@set_time_limit(0);
		@ini_set('memory_limit', '2G');

I'm desperate...
Thanks for your patience.

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

  • 3 years later...

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...