Post by jefrey1983 » Wed Jun 30, 2010 4:02 pm

i am duplicating the information my problem is that the header.tpl
i was able to duplicate the information except the content will be the same, changing the information causes undefined variable

Code: Select all

<li><a href="<?php echo $information; ?>"><?php echo $text_information; ?></a></li>
<li><a href="<?php echo $information; ?>"><?php echo $text_information; ?></a></li>

User avatar
Active Member

Posts

Joined
Sat Jan 30, 2010 6:58 pm

Post by JAY6390 » Wed Jun 30, 2010 6:11 pm

Hi Jefrey,
Going to need you to be a bit clearer with this my friend, I don't actually see a question here. Is this for the admin interface yeah?

I'm guessing you're trying to add the menu link.
in the controller common/header.php below this line

Code: Select all

$this->data['information'] = HTTPS_SERVER . 'index.php?route=catalog/information&token=' . $this->session->data['token']; 
put

Code: Select all

$this->data['your_file_name'] = HTTPS_SERVER . 'index.php?route=catalog/your_file_name&token=' . $this->session->data['token']; 
In the language file language/english/common/header.php add the line

Code: Select all

$_['text_your_file_name'] = 'Title of the menu item here'; 
And findally in your view/template/common/header.tpl put

Code: Select all

<li><a href="<?php echo $your_file_name; ?>"><?php echo $text_your_file_name; ?></a></li>
That should sort it, just replace the your_file_name with the name of your new file

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by jefrey1983 » Wed Jun 30, 2010 7:32 pm

Hi
I have duplicated modules in the past but it seems the information module requires a bit more work the real question is how can i duplicate the information module

User avatar
Active Member

Posts

Joined
Sat Jan 30, 2010 6:58 pm

Post by JAY6390 » Wed Jun 30, 2010 7:37 pm

There really isn't anything more to it. Just make sure you copy all of the information.php and information.tpl files from the controller, template, language folderss and also the model folder if applicable

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by jefrey1983 » Thu Jul 01, 2010 4:46 am

hi
thanks i am getting error

Code: Select all

Error: Table 'mydb.information2' doesn't exist
Error No: 1146
SELECT COUNT(*) AS total FROM information2
then i duplicated the
infromation
information_store
information_desc in mysql
now getting this error


also i renamed the information to information2
Error: Unknown column 'id.language_id' in 'where clause'
Error No: 1054
SELECT * FROM information2 i LEFT JOIN information2_description id ON (i.information2_id = id.information2_id) WHERE id.language_id = '1' ORDER BY id.title ASC LIMIT 0,20
Last edited by jefrey1983 on Thu Jul 01, 2010 5:03 am, edited 4 times in total.

User avatar
Active Member

Posts

Joined
Sat Jan 30, 2010 6:58 pm

Post by SteveSherry » Thu Jul 01, 2010 4:56 am

Looks like you'll need to duplicate the information tables as well.
information
information_description
information_to_store

My Website ¦ Summer Madness Special Offer ¦


Active Member

Posts

Joined
Thu Apr 08, 2010 7:47 am
Location - Wirral, UK

Post by jefrey1983 » Thu Jul 01, 2010 7:36 am

okay i get this error

Code: Select all

Fatal error: Call to undefined method ModelSettingStore::getTotalStoresByinformation2Id() in /admin/controller/catalog/information2.php on line 439
this my line 439

Code: Select all

$store_total = $this->model_setting_store->getTotalStoresByinformation2Id($information2_id);

User avatar
Active Member

Posts

Joined
Sat Jan 30, 2010 6:58 pm
Who is online

Users browsing this forum: No registered users and 14 guests