Jump to content


Photo

Create home tab in Presta 1.6

hometab prestashop1.6 createmodule module

  • Please log in to reply
5 replies to this topic

#1 phingko

phingko

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 26 January 2015 - 10:37 PM

Hi,

 

I tried to create a hoem tabs in Prestashop 1.6 by following this tutorial;

http://nemops.com/pr...s/#.VMa6J0eUfK0

 

But I keep getting this error 

2 errors 

  1. pshometabs (parse error in /modules/pshometabs/pshometabs.php)
  2. pshometabs (class missing in /modules/pshometabs/pshometabs.php)

I'm sure I follow all steps and pasted the right code.

 

Has anyone try this code and works before?

 

Cheers



looking for the best presta addons with outstanding support? check this: PrestaShop Modules

#2 phingko

phingko

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 26 January 2015 - 10:43 PM

I figured it out, but now I got this error on the backend module;

 

[PrestaShop] Fatal error in module Module.php(1224) : eval()'d :
Cannot redeclare psHomeTabs::install()

 

Seems like there is an error when installing, the code for install as below;

 

public function install()

{
if (!parent::install())
return false;
return true;
}
 
 
Is the code correct?
 
Cheers


#3 vekia

vekia

    Advanced Member

  • Members
  • PipPipPip
  • 10166 posts

Posted 26 January 2015 - 10:55 PM

your module contains probably 2 install functions.


free tutorials, free templates, free addons, prestashop modules MndfRK4.png  lpHMrZ5.png  gtKHYO7.png  google-48.png


#4 phingko

phingko

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 26 January 2015 - 11:19 PM

Hi vekia, you are right, it was a stupid msitake.

But now it generates another error;

[PrestaShop] Fatal error in module pshometabs:
syntax error, unexpected 'exit' (T_EXIT)

i checked the error_log and it's said;

PHP Parse error:  syntax error, unexpected 'exit' (T_EXIT) in //public_html/modules/pshometabs/pshometabs.php on line 1

I'm not sure why it could get that error as the first line is <?php only

 

Any ideas?

 

Thanks in advanced



#5 phingko

phingko

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 26 January 2015 - 11:24 PM

Got it, should put is as

<?php if

instead of new line

 

Will marked this as solved.



#6 phingko

phingko

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 26 January 2015 - 11:26 PM

Got it, should put is as

<?php if

instead of new line

 

Will marked this as solved.